One Day One Cmd

Place for playing with commands…

Day13: $ expand

ODOC:$expand -t 3 foo.txt.The expand cmd is used to replace tabs with spaces in files.Tab size can be set with -t no.Default tab size is 8.

eg:$expand -t 3 foo.txt.This ll change all tabs in foo.txt to 3 spaces,display it on d screen.imp:It doesnt affect foo.txt.It just change the tab size & display it on d screen.

To save d tab size changes of one input file to another file,use > symbol.eg:$expand -t 3 foo.txt > foo_new.txt.:-)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: