I have a few to questions pose in response first:-
What have you tried so far?
What output/errors do you get?
What OS and version are you using?
What are your preferred tools? (C, shell, perl, awk, etc.)
What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far?
You could have a sed, awk, shell script that reads trims and re-writes or even a tr might do the trick. A bit of context to where you are calling this would be good and I'm sure we can work it out.
We're all here to learn and getting the relevant information will help us all.
The print file has a reset to 10 cpi at the beginning of every page.
Previously we were using smbclient with "translate -c" to convert the file from unix to dos, but when we changed to use netcat, it seems that the nulls are causing the record to be dropped.
I have tried variations of
s/\0031\0000//
with sed and vi to no avail.
What I would like is something like:
sed -f sed.inp <$file |netcat -h 192.168.1.1 -p 9100
---------- Post updated at 05:03 PM ---------- Previous update was at 04:49 PM ----------