This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsb_release -a #gives the version of ubuntu. |