The head command only counts lines in qsh. The file can be 200 bytes up to 50 megabytes (EDI files) and some don't have any carriage return or line feed characters, so counting lines appears to exceed limits.
head -n 3 filename.EDI | grep GS*PD*
there is no option for character count in the qsh version of head most Linux books show
head -c 512 filename.EDI | grep GS*PD*
I just need to look for a particular string "GS*PD*" in the first 256 bytes. I was going to use grep to look for it, but don't want to read 50 megabytes just to look in the first few characters for a string.
Any ideas?
head -n 3 filename.EDI | grep GS*PD*
there is no option for character count in the qsh version of head most Linux books show
head -c 512 filename.EDI | grep GS*PD*
I just need to look for a particular string "GS*PD*" in the first 256 bytes. I was going to use grep to look for it, but don't want to read 50 megabytes just to look in the first few characters for a string.
Any ideas?
Comment