Quick tip to change parameters in different files

Quick tip to change parameters in different filesNo Gravatar
Hot:sun Quick tip to change parameters in different filessun Quick tip to change parameters in different filessun Quick tip to change parameters in different filessun dark Quick tip to change parameters in different filessun dark Quick tip to change parameters in different files

for i in *.cfg; do mv $i $i.bak;sed ’s/a/b/’ $i.bak > $i; done

The above command is very useful to change certain regular expressions in couple of files in one directory. This can be used in variety of ways to achieve a lot of things which would normally take some time to do manually.

Originally posted 2008-10-16 21:04:58.

Share This Post

Technorati Tags: bash, Linux, sed

Blog Traffic Exchange Related Websites

Linux find command – Find file and directories faster and easier

Linux find command – Find file and directories faster and easierNo Gravatar
Hot:sun Linux find command   Find file and directories faster and easiersun Linux find command   Find file and directories faster and easiersun dark Linux find command   Find file and directories faster and easiersun dark Linux find command   Find file and directories faster and easiersun dark Linux find command   Find file and directories faster and easier

This command is very powerfull when used with combination of filters and pipes and RE.

More >

Originally posted 2008-09-15 13:21:33.

Share This Post

Technorati Tags: Computer file, File Management, File Managers, Filename, Languages, Linux, Operating system, programming, Rm

Blog Traffic Exchange Related Websites

Edit a File When You Are Viewing It Using more / less Command

Edit a File When You Are Viewing It Using more / less CommandNo Gravatar
Hot:sun Edit a File When You Are Viewing It Using more / less Commandsun Edit a File When You Are Viewing It Using more / less Commandsun Edit a File When You Are Viewing It Using more / less Commandsun dark Edit a File When You Are Viewing It Using more / less Commandsun dark Edit a File When You Are Viewing It Using more / less Command

Aritcle here.

Edit a File When You Are Viewing It Using more / less Command

More >

Originally posted 2008-11-02 20:41:41.

Share This Post

Technorati Tags: editor, Fedora, less, Linux, more

Blog Traffic Exchange Related Websites