PDA

View Full Version : termnal comand replace one tab with two



earobinson111
1st October 2004, 07:22 PM
ok well the title says what i want to do i want to replace one tab with two

i can use tr, but that only dose one to one as far as i can figure out

any ideas?

Jman
1st October 2004, 10:47 PM
So you want to only press one tab to get bash command completion? Or does this involve tabs in your terminal emulator?

duncan
2nd October 2004, 01:50 PM
accidental post - sorry

duncan
2nd October 2004, 09:45 PM
Are you wanting to change a text file? If so, try this
sed 's/\t/\t\t/g' yourfile > newfile

This will not change your original file. It just "copies" yourfile to newfile, replacing each tab with 2 tabs.

duncan