Skip to content

Instantly share code, notes, and snippets.

View sidanand67's full-sized avatar

Sidharth Anand sidanand67

View GitHub Profile
@sidanand67
sidanand67 / Sidharth_CLI_Drills_II.sh
Last active July 1, 2022 07:08
Sidharth_CLI_Drills_II
# CLI Drill 2
# ===== Pipes =====
# Question 1
echo "Downloading file..."
wget https://raw.githubusercontent.com/bobdeng/owlreader/master/ERead/assets/books/Harry%20Potter%20and%20the%20Goblet%20of%20Fire.txt 2> log.txt -O book.txt
# Question 2
echo -e "\n\nTop 3 lines"
head -n 3 book.txt
@sidanand67
sidanand67 / Sidharth_CLI_Drills_I.sh
Last active June 29, 2022 09:30
Sidharth_CLI_Drills_I
# Question 1
mkdir hello
cd hello
mkdir five one
cd five
mkdir six
cd six
touch c.txt
mkdir seven
cd seven
@sidanand67
sidanand67 / temperature.py
Created January 10, 2022 16:50
Python script to check current weather of a city from a terminal
#!/usr/bin/python
import json
import requests
import sys
def check_weather(city):
api_key = "34b68bf9f7b70bfa195f3b34c58573c1"
@sidanand67
sidanand67 / script.sh
Created September 29, 2021 03:13
Script for changing linux file permissions in a directory
#!/bin/bash
echo "Changing permissions..."
for entry in "$search_dir"./*
do
if [[ "$entry" == *.sh ]]; then
continue
elif [[ -d $entry ]]; then
chmod 755 $entry