Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fold then tab

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
suppose my input is:

this is some text. #note the tab

how can I fold the line after "some" and have it tab over on the next line so that the word "next" is placed under "this"?

fold -s -w 21 will fold it but it won't keep the tab spacing.
Thanks for any help.
 


why not substitute <ctrl-M><tab> for the <tab>. you can do this with SED.

sed -e 's/<tab>/<ctrl-v><ctrl-m><tab>/'

now this is assuming that this is the only TAB on the line.

for <tab> hit the TAB key
for <ctrl-v> hold the control key and press v
for <ctrl-m> hold the Control Key and press m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top