For example sed sfoxoxg file will replace all occurance of


Assume you have a text file called file. Explain the following command lines.

1. sed "s/the/a/g" file
2. sed -n "s/[A-Z]/&/gp" file
3. sed "32,45 s/[()]//g" file
4. sed "/^$/d" file
5. sed "s/\([0-9]\)-\([0-9]\)/\1\2/g" file
6. sed "80q" file

For example, sed 's/fox/ox/g' file will replace all occurance of fox with ox and not the just the first one in file.

 

Solution Preview :

Prepared by a verified Expert
Software Engineering: For example sed sfoxoxg file will replace all occurance of
Reference No:- TGS0664967

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)