Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jbmjlm10

    Command to find line length in a text file

    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.
  2. jbmjlm10

    Is there a way to specify hex values on the tr command?

    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...
  3. jbmjlm10

    Is there a way to specify hex values on the tr command?

    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...
  4. jbmjlm10

    Script command(s) to add blanks at end of each line in a text file

    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...
  5. jbmjlm10

    Script command(s) to add blanks at end of each line in a text file

    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...
  6. jbmjlm10

    Using your own GroupId

    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.
  7. jbmjlm10

    Using your own GroupId

    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 ...
  8. jbmjlm10

    How is an hex string assigned to a char array

    Salem, thank you very much for your reply and for the c code you provided. It was exactly the answer I was looking for -- and more!!
  9. jbmjlm10

    How is an hex string assigned to a char array

    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...
  10. jbmjlm10

    Problems setting MsgId before MQPUT

    Never mind! I carelessly set the wrong MsgId. After I corrected that, it worked just like it should...thanks
  11. jbmjlm10

    Problems setting MsgId before MQPUT

    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...

Part and Inventory Search

Back
Top