Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Nalam V S S Krishna Chaitanya nalamchaitanya

👋
View GitHub Profile
@nalamchaitanya
nalamchaitanya / sed.sh
Last active Jun 27, 2016
Find and replace a string all over a file in linux terminal.
View sed.sh
sed 's/<string to find>/<string to replace>/g' <file to find and replace>
# sed is a tool to find and replace in terminal.
# the thing in quotations is the main gist of command.
# s means search.
# g means do the operation globally over the file.
@nalamchaitanya
nalamchaitanya / awk.sh
Last active Jun 16, 2016
All hacks related to awk
View awk.sh
awk -F ',' '{print $1,$2}' <filename> #Divides the ',' separated file and prints the column 1 and 2 by separting with space.
awk -F ',' '{a[$1]++;}END{print $1,a[$1]}' <filename> # Gives the frequency of words in file.
@nalamchaitanya
nalamchaitanya / Miscellaneous.sh
Last active Jun 15, 2016
Various code snippets useful in ubuntu terminal.
View Miscellaneous.sh
lsb_release -a #gives the version of ubuntu.