More tar examples: The Ultimate Tar Command Tutorial with 10 Practical Examples 2. grep command examples Search for a given string in a file (case in-sensitive search). $ grep -i "the" demo_file Print the matched line, along with the 3 lines after it. $ grep -A 3 -...
5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command. $sed 's/.$//' filename Print file content in reverse order $ sed -n '1!G;h;$p' thegee...
26. kill command examples Use kill command to terminate a process. First get the process id using ps -ef command, then use kill -9 to kill the running Linux process as shown below. You can also use killall, pkill, xkill to terminate a unix process. $ ps -ef | grep vim ramesh 7243...
5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command. $sed 's/.$//' filename Print file content in reverse order $ sed -n '1!G;h;$p' thegee...
The second part of sed is to remove the empty lines created by the first sed command. 24. Delete only the line prior to the line containing the pattern 'Linux', not the very line: $ sed -n '/Linux/{x;d;};1h;1!{x;p;};${x;p;}' file ...
5. lsof -u username: list files opened by user name netstat: a great article on this command http://www.thegeekstuff.com/2010/03/netstat-command-examples/ 1. netstat -a : list all ports
Bison is an replacement for the yacc. Bison is basically a parser generator similar to yacc. This explains few bison command line options that you can use to generate your output file based on given input file. For details on how to use bison grammar is
The sed command has two forms:sed -e command editfiles sed -f scriptfile editfiles The first form, using -e, allows you to specify an editing command right on the command line. Multiple -e options can be specified on the same line....
A general purpose command-line fuzzy finder. mcfly Fly through your shellhistory. Great Scott! choose A human-friendly and fast alternative tocutand (sometimes)awk jq sedfor JSON data. sd An intuitive find & replace CLI (sedalternative). ...
Tutorial on using uniq, a UNIX and Linux command for reporting or filtering repeated lines in a file. Examples of showing a count of occurrences, showing only repeated lines and ignoring characters and specific fields.The UNIX and Linux uniq command ...