Simply put I have a small sed command that is supposed to trim " and wrap the input between the <id> tag. It goes well single line and multiple line input, but badly misbehaves on an input file (via cat or as a sed parameter)
Sample outputs (and as the final command a head on the file).
~> echo 200 | sed 's/"//g;s/^/<id>/g;s/$/<\/id>/g'
<id>200</id>
~> sed 's/"//g;s/^/<id>/g;s/$/<\/id>/g' <<EO
heredoc> 2301930
heredoc> 1230910293
heredoc> 102391093
heredoc>
heredoc> EO
<id>2301930</id>
<id>1230910293</id>
<id>102391093</id>
<id></id>
~> cat job.csv | sed 's/"//g;s/^/<id>/g;s/$/<\/id>/g' | head
</id>79116
</id>79125
</id>79126
</id>78327
</id>78284
</id>78288
</id>78291
</id>78304
</id>78311
</id>78335
~> head job.csv
"179116"
"179125"
"179126"
"178327"
"178284"
"178288"
"178291"
"178304"
"178311"
"178335"
What do you guys think can be the issue?