Q. How do I perform a case-insensitive search using sed under UNIX / Linux? I’d like to match all combination of word – foo, FOO, FoO and so on while replacing or performing other operations.
{ 2 comments }
Q. How do I perform a case-insensitive search using sed under UNIX / Linux? I’d like to match all combination of word – foo, FOO, FoO and so on while replacing or performing other operations.
{ 2 comments }
Q. How do I insert a newline into the RHS of a substitution using sed under Linux / UNIX like operating systems? My line pattern is as follows:
This is a test. This is another input.
I’d like to insert a newline after dot (.).
{ 0 comments }
Q. How do I find and replace character codes ( control-codes or nonprintable characters ) such as ctrl+a using sed command under UNIX like operating systems?
{ 10 comments }
How do I replace a string with another string in all files? For example, ~/foo directory has 100s of text file and I’d like to find out xyz string and replace with abc. I’d like to use sed or any other tool to replace all occurrence of the word.
{ 51 comments }
How do I delete a last character from input line under UNIX / Linux using sed tool? My sample scientific input data line is as follows and I’d like to get rid of last + character only:
379100.46+521870.11+363838.75+382869.59+
How do I used sed to delete last + character?
{ 10 comments }
Q. How do I use sed for selective deletion of certain lines? I have text as follows in file: Line 1 Line 2 WORD1 Line3 Line 4 WORD2 Line5 I would like to delete all lines between WORD1 and WORD2 to produce final output: Line 1 Line 2 Line5 A. For selective deletion of certain [...]
{ 10 comments }