{ 0 comments }
gnu sed
I have a file called rsnapshot.conf. It has the words “ssh_args=-p 1222″. How do I match and remove (delete) the words “ssh_args=-p 1222″ from config file using sed command under Linux or Unix like operating systems?
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 }
How do I remove all spaces from string using shell scripts? I’ve var=”This is a test”, and I’d like to remove all spaces.
{ 8 comments }




Linux / UNIX View Only Configuration File Directives ( uncommented lines of a config file )
by nixCraft on May 29, 2008 · 6 comments
Most Linux / UNIX configuration files are documented using comments, but some time I just need to see line of configuration text in a file. How can I view just the uncommented configuration file directives from squid.conf or httpd.conf file?
{ 6 comments }