tr
and mv
commands. You will need some quoting too. Just try the tr command to start.
tr
commandsed
command. To do this, write a function that converts one file and shows the output on the screen.
Call the function untab
.
The file to convert
should be an argument to the function. Have this script write its output to a new file in the current directory with the same name, but that ends with a .csv extension.
After you have it working for a single file (using the function), updated it to work for all file arguments passed to the script.
You may choose to use tr
or sed,
whichever you prefer.
For more fun, have the script take the character to change the tab to as the first argument (and default to a ,).
More fun!
explore
ls -ltS | sed -e 's/ */|/g' | cut -d\| -f 5,9- | sed -e 's/|/: /' -e 's/|/ /g'