HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   Shell script using sed or awk (http://www.howtoforge.com/forums/showthread.php?t=54147)

sudhanshu12788 15th September 2011 19:23

Shell script using sed or awk
 
Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario.

Mark_NL 16th September 2011 09:52

Code:

sed 's/\s/,/g' file.txt > file2.txt


All times are GMT +2. The time now is 10:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.