Hello,
Is there an AIX or UNIX command to find the length of each line of a text file? The wc command does not give us that option. Thank you for your help.
Yes, that is very clever! Thank you PCV. But did that actually work for you just the way you have it? I had to make a change as follows to make it work:
h2o(){
echo "ibase=16\nobase=8\n$1" | bc
}
tr \\"$(h2o 80)" \\"$(h2o 9F)" < file.in > file.out
The tr command still needs a \ to tell it...
I have a file and wanted to change any occurrences of hex 80 to hex 9f. The only way I can do this is if I specify the equivalent octal value 200 and 237, respectively. In other words, the following tr command works fine:
tr '\200' '\237' < file.in > file.out
Is there a way I can make the tr...
Thank you very much vgersh99 and PHV. They both work! The sed command works for any line length less than 256. The awk command works for any line length--I've tried over a 1000 and it still works OK. I've changed the awk command to make it into a script that can be used for any line length...
If I have a text file that looks like this:
this is the first line
line 2 is this
line 3
this is another line of this test file
I'd like to add blanks at the end of each line to make them all the same length. Let's say I want each line to be exactly 125 bytes long. That is, I want the end of...
I've answered my own question. If you want to set your own GroupId value, the "pmo.Options = MQPMO_LOGICAL_ORDER" option should not be used. I removed that and the GroupId was set to the value I specified.
I'm trying to use my own GroupId value, but MQSeries insists on generating its own. This does not make sense to me. Here's what I have on a c programs:
MQBYTE24 GroupId = "123456";
I also have the following before the PUT:
md.MsgFlags = MQMF_MSG_IN_GROUP ;
pmo.Options = MQPMO_LOGICAL_ORDER ...
I know how to assign a character string to an array -- one way would be like this:
char_str[] = "whatever string you want to assign";
But how does one assign a hex string? I tried this but it did not work:
char_str[] = 0x"003A00BE00C300C700C9";
Strangely enough, I do need those x'00' bytes...
Hi,
I have 2 files and I want to put file 1 into queue A and file 2 into queue B. I'm doing this with one C program. I'm putting each record into queue A and I'm letting MQ generate a unique MsgId for each record. For each put to queue A, I'm saving the MsgId, so that I can use it to put the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.