sed: Insert multiple lines before or after pattern match
In my last articles I had shown you the arguments to be used with sed to add or append any character in the beginning or end of the line and to ignore whitespace while grepping
In my last articles I had shown you the arguments to be used with sed to add or append any character in the beginning or end of the line and to ignore whitespace while grepping
Here our requirement is to replace a line with our content when a match is found with in the file Our sample file /tmp/file This is line one This is line two This is line
Before is the requirement for this example. I have a sample file with below content at /tmp/file This is line one This is line two This is line three This is line four Here in
There are many ways to do this, I will try to show some Sample file '/tmp/file' Apple Apricot Avocado Banana Bilberry Blackberry Blackcurrant Method 1 Using 'nl' # nl /tmp/file 1 Apple
In my last articles I had shared the arguments with sed which can be used to perform case insensitive actions (search, replace..) in a file and to delete all blank lines from the file. Before starting with some command
How to append a string after a match? For eg I have a text line "This is not test" where I would like to insert "really" after matching "is" Command: echo "This is not test"
Unable to connect to iCloud Server or iTunes from your laptop? I recently did an update of iTunes on my laptop after which I was unable to re-login to the iTunes with the below error
I got this error the other day while working on Red Hat Enterprise Linux 7.3 and after digging for a while I got to know there is a sort of a BUG in RHEL 7.3.