How can I insert a tab in a text string after the occurrence of a particular word? (Suggest Unix commands or Perl script)
eg. '/home/data/samples/2014-08-05/20140805.sample.000005.eml:Subject:'
I want to insert a tab after eml:
.
How can I insert a tab in a text string after the occurrence of a particular word? (Suggest Unix commands or Perl script)
eg. '/home/data/samples/2014-08-05/20140805.sample.000005.eml:Subject:'
I want to insert a tab after eml:
.
You can use sed to replace text like this:
sed -e 's/eml:/eml:\t/'
for example it works like this:
echo "/home/data/samples/2014-08-05/20140805.sample.000005.eml:Subject:" | sed -e 's/eml:/eml:\t/'
if you have a file which contains lot of these expressions:
cat <file> | sed -e 's/eml:/eml:\t/' > <new_file>