Skip to content

Instantly share code, notes, and snippets.

View subham13-02's full-sized avatar

Subham Sahu subham13-02

  • 17:46 (UTC -12:00)
View GitHub Profile
@subham13-02
subham13-02 / CLI Drill 2
Created January 23, 2024 12:06
CLI Practice Drill 2
curl -o url #downloaded content from the given url
head -n 3 'Harry Potter and the Goblet of Fire.txt' #printed first three lines of this file
tail -n 10 'Harry Potter and the Goblet of Fire.txt' #printed last 10 lines of this file
grep -o -i -w 'Harry\|Ron\|Hermione\|Dumbledore' "Harry Potter and the Goblet of Fire.txt" | wc -l v #printed number of time those word apear together
sed -n '100,200p' "Harry Potter and the Goblet of Fire.txt" #Print lines from 100 through 200 i
tr -s '[:space:]' '\n' < "Harry Potter and the Goblet of Fire.txt" |sed 's/[^A-Za-z]/ /g' | tr 'A-Z' 'a-z' | sort | uniq | wc -l #printed number of unique words
@subham13-02
subham13-02 / CLI Drill 1
Created January 23, 2024 11:32
CLI Practice Drill 1
mkdir hello #created a directory hello
mkdir one #created a directory one
cd one #changed the current directory from home to one
touch a.txt b.txt #created empty txt files a.txt and b.txt
mkdir two #created a directory two
cd two #changed the current directory from home to two
tocu d.txt #created a empty txt file d.txt
mkdir three #created a directory three
cd three #changed the current directory from two to three
tocuh e.txt #created a empty txt file e.txt