sed :Replace whole line when match found
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
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"
To improve security in our environment many times we have to blacklist certain modules from getting loaded in our setup to avoid any security leak. The provided procedure is tested with Red Hat Enterprise Linux
Kickstart is used to perform an automated installation where no manual intervention would be needed but there are times when we want the end user to fill in some needed details for eg keyboard type,
Follow the below link to get an overview of the syntax used in the sudoers file Understanding Syntax, Aliases, Variables used in sudoers file with examples In this blog I will try to keep my