Occasionally, you might want to remove tabs from a file. This can be accomplished with the expand command. Here's an easy way of doing that.
View tabs (^I)
# cat -v -t esoftfile
esoft^Iesoft^Iesoft^Iesoft
esoft^Iesoft^Iesoft^Iesoft
esoft^Iesoft^Iesoft^Iesoft
esoft^Iesoft^Iesoft^Iesoft
esoft^Iesoft^Iesoft^Iesoft
View tabs (^I) removed and replaced with 5 spaces to stdout
# expand esoftfile | cat -v -t
esoft esoft esoft esoft
esoft esoft esoft esoft
esoft esoft esoft esoft
esoft esoft esoft esoft
esoft esoft esoft esoft
Tabs removed and output written to file
# expand esoftfile > esoftfile_notab
Verify tabs removed
# vi esoftfile_notab
esoft esoft esoft esoft$
esoft esoft esoft esoft$
esoft esoft esoft esoft$
esoft esoft esoft esoft$
esoft esoft esoft esoft$
~
~
~
:set list
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
2 comments:
Thnaks for sharing buddy
Thanks.
Post a Comment