regex - Awk/ Perl regular expression to match space with hyphen -
i have following 2 lines in sample.txt
aia - 1000 aia integrations e-business suite - 5544 now want see following output:
column1 | column2 aia 1000 aia integrations e-business suite 5544 i tried:
awk -f "-" sample.txt it filters hyphen "-" near "e-business suite" how make filter last hyphen instead of intermediate ones.
you can use:
awk -f ' - ' -v ofs=';' 'begin{print "column1", "column2"} {print $1, $2}' file | column -s ';' -t column1 column2 aia 1000 aia integrations e-business suite 5544 -f ' - 'uses" - "input field separator-v ofs=';'uses;output field separatorcolumn -s ';' -tformats data in tabular format using;delimiter
Comments
Post a Comment