Tag Info

New answers tagged

3

The better way to change the column separator and use columncommand: sed 's/ */;/g' file | column -ts';' which produce: Item Code Active Description Store Room Row Shelf Bin On Hand 38NUTZSL Y 3/8"-16 HEX ZINC NUT B 03 C 2 0 WELD-AL Y WELD, ALUM. ROD, ...


0

You need to set Output Field Separator to tab \t: One way to do it is with -v option: awk -vOFS='\t' '{$3 = "AD"; print}' file another possibility inside awk, say in the BEGIN block: awk 'BEGIN{OFS="\t"}{$3 = "AD"; print}' file


-1

Try this, sed -ri 's/([0-9]+)/<a href=\"&.html\">link<\/a>/g' index.html


-1

How about : sed 's_^\([^>]\+>\)\([[:digit:]]\+\)_\1<a href="\2.html">link</a>_' file.txt We are using _ in the sed substitution pattern format instead / as / is present in the input ^\([^>]\+>\) finds the characters upto > (including) and put them in a group \([[:digit:]]\+\) finds the mentioned digits and put them in a group ...


-1

sed -e 's/ test3 / /g' -e 's/ test3//g' -e 's/test3 //g' myfile.txt Please try above



Top 50 recent answers are included