Wednesday, November 18, 2015

Edit a file directly using "sed" command in Linux


sed is stream editor, but can edit files directly

sed -i -e 's/foo/bar/g' hello.txt
 
s is used to replace the found expression "foo" with "bar" and g used to

replace any found matches.

-i option is used to edit in place on hello.txt.

-e option indicates a command to run.


No comments:

Post a Comment

How to interact with the non-interactable Web Elements in Selenium

How to interact with the non-interact able Web Elements in Selenium    // Find the non-interactable element element WebElement element = dr...