replace tab sed 1

replace tab sed

sed -i.bak $'s/\t/  /' file.txt	#replace tab with sed command

Here is what the above code is Doing:
1. The -i.bak option tells sed to edit the file in place, but to save a copy of the original file with the extension .bak.
2. The $’s/\t/ /’ tells sed to replace all tabs with two spaces.
3. The file.txt is the name of the file to edit.

Similar Posts