Showing posts with label sed. Show all posts
Showing posts with label sed. Show all posts
Thursday, December 17, 2015
To get the lines between the two pattern in a file in BOSS Linux
To get the lines between the two pattern in a file.txt use the following sed command format
sed -n "/pattern1/,/pattern2/p" file.txt
Wednesday, November 18, 2015
Edit a file directly using "sed" command in Linux
sed
is stream editor, but can edit files directlysed -i -e 's/foo/bar/g' hello.txt
s
is used to replace the found expression "foo" with "bar" and g
used toreplace any found matches.
-i
option is used to edit in place on hello.txt.-e
option indicates a command to run.
Subscribe to:
Posts (Atom)
Linux Kernel Compilation
Step 1: Install Required Packages Install additional packages before building a kernel. To do so, run this command: sudo apt-get install gi...
-
Step:1 sudo apt-get install python-pip Step:2 pip install -U selenium for python3 and more install Step:1 sudo apt-get...
-
This process will common for all HP Printers like HP LJ P 1007, P1020,P1020 plus,1022,3050 MFP, M 5035 MFP,P 2015N and Configuring the HP ...
-
Global Parameters [global] Anything in here applies to Samba as a global setting. There is some configuration info here ...