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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by shaokat

  1. shaokat

    Convert Unix-Dos file to Dos file!

    I have a file which has been created using two different systems and contains both the Unix and Dos file type. ie. line ending with \r in some cases and \r\n in the rest. How do I effectively convert this file into a DOS file and or Unix file? This is what I have am trying, but not able to...
  2. shaokat

    How to merge 3 files on matching criteria?

    I tried and got stuck so I was wondering if there was any new method out there I could learn. -Lazy
  3. shaokat

    How to merge 3 files on matching criteria?

    I have 3 file. Main file <File 1>, Reference File A <File 2> and B <File 3>. - There may or may not exist a Matching ID and Mailing Address in each reference file. - For each matching ID and Mailing address from reference file A and B, the set of records have to be &quot;moved&quot; to the...
  4. shaokat

    Do variable interfere with background processing??

    I have this loop: for transpart in a b c d do while read jpegimage pageseg do dest=$psegdir/$pageseg if [ -f $extract/$jpegimage ] ; then echo ConvertImages... converting $jpegimage cat $extract/$jpegimage |jpegtopnm |pnmscale -xysize 2100 1680 |pgmtopbm -floyd...
  5. shaokat

    Rename filename with the next seq number

    Can you help me figure out how to write a awk / ksh or any unix script for this: Eg: File to move: filename0001.out Listing of files found at the location: filename0001.out filename0002.out filename0003.out Result: filename0001.out filename0002.out filename0003.out filename0004.out <-The...
  6. shaokat

    Append new line.

    I have the foll input file: ============= 1 TRUMAN - CLINTON 0 GEORGE ===========EOF For every 1st char, I have to do the following: if 1st char is - leave 1 line before. if 1st char is 0 leave 2 line before. This is the expected output. ============= 1 TRUMAN CLINTON GEORGE...
  7. shaokat

    I am trying to pass an argument to

    I am trying to pass an argument to a script and use that argument in an awk statement. Is there something missing in the code? Its not working! It is creating a file with blank extension. TIA -KAT #!/usr/bin/ksh if [ $# != 2 ] ;then echo &quot;usage: $0 argument&quot; exit fi...
  8. shaokat

    Replace record in the previous line.

    Here is the problem with samples. Forget the &quot;position&quot; mentioned earlier. Consider this as input: ABCD 123456789 DERS 234234234 ERED 345634563 RTYR 343434343 TYUT 343434343 TERE 368876655 This is the expected output: ABCD 123456789 DERS 234234234 ERED 455634563 RTYR 343434343 Y...
  9. shaokat

    Replace record in the previous line.

    I have a script that matches two fields (at position 7 length 20 and position 479 length 6) and inserts character '01' and '02' on subsequent matching records. Works fine so far. Now, I want to replace (say position 6) with 'Y' in the first record of the matching condition. ie. When I get to...
  10. shaokat

    Removing non-printable characters via sed?

    No! there are some characters that are made up to 2 chars and only one white space gets replaced. I tried that and it messes the fixed length field length of records.
  11. shaokat

    Removing non-printable characters via sed?

    How can I replace the non-printable characters with white spaces? This particular script only removes the non-printable chars.

Part and Inventory Search

Back
Top