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 Chriss Miller 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 beaster

  1. beaster

    SED Question

    Thanks for the help! I also was able to get what I wanted with: nawk '{gsub(/^[^:]*l=/,"");print}' input.file > output-file
  2. beaster

    SED Question

    I have the printout below which may have many lines in it. =================================================================================== Proxy Adm State Op. State MO =================================================================================== 22697 1 (UNLOCKED) 0...
  3. beaster

    Ignore Binary

    So like this below? #begin code BEGIN { sub(/\x03/,"",$0) } RS=FS="" } $1 ~ /^CB +/ && $2 ~ /^YES +/ { print prev } {prev=$NF} #end code
  4. beaster

    Ignore Binary

    The unix scripting forum gave me some script to perform what I needed, but I am stuck with an issue: #begin code BEGIN { RS=FS="" } $1 ~ /^CB +/ && $2 ~ /^YES +/ { print prev } {prev=$NF} #end code At the top of my file there is similiar to text below: USERCODE:beaster PASSWORD: WO...
  5. beaster

    Count Items In Column 2

    I have an input file called bsc_cells.txt that I need to count how many times the items in column 2 appear. The example input is below: RXOTX-99-0 VA0449C ALL GSM1900 ALPHAC 45 RXOTX-99-1 VA0449C ALL GSM1900 ALPHAC 45 RXOTX-99-2 VA0449C ALL GSM1900...
  6. beaster

    SED TO JOIN WORDS

    I have a file called file1.txt The contents are similiar to: big red dog jumps over fence blue bird in yard hound chases fox I need to use sed or something else to read the input file and output to new file2.txt after joining all the words to look like: bigreddogjumpsoverfence bluebirdinyard...
  7. beaster

    Two Files Two Column Comparison

    Would it just be easier to cat each file before I try to do what I am looking to do with field 1 and 6 by just sending those two columns to a new file? If so, how do I cat only those two fields to a new file?
  8. beaster

    Two Files Two Column Comparison

    0000000 V A 0 3 3 3 C 0000020 4 0 0 3 8 5 0000040 1 5 4 7 1 5 0 0000060 1 3 3 6 0 0000100...
  9. beaster

    Two Files Two Column Comparison

    CaKiwi, I added the above like this to the nawk program BEGIN { RS="\r\n" } FNR==NR && NF>5{a[$1]=$6;next} NF>5{if($6+0>a[$1]+30)print $1,$6} and got this back vaossws03{root} #: nawk -f drop_nawk drops_temp3 test1 > test2 nawk: input record `VA0333C ...' too long input record...
  10. beaster

    Two Files Two Column Comparison

    0000000 V A 0 3 3 3 C 0000020 4 0 0 3 8 5 0000040 1 5 4 7 1 5 0 0000060 1 3 3 6 0 0000100...
  11. beaster

    Two Files Two Column Comparison

    File 1 (Newest) VA0333C 400 385 1547 150 13 360 VA1008C 88 82 522 42 8 360 VA0333B 340 325 1147 79 8 360 VA4350B 13 13 78 5 6 359 VA4350A...
  12. beaster

    Two Files Two Column Comparison

    I am having an issue running it like CaKiwi's example. I think it is failing because it thinks the first field is too long. vaossws03{root} #: nawk -f drop_nawk drops_temp3 testfile > final.txt nawk: input record `VA0333C ...' too long input record number 0, file testfile source...
  13. beaster

    Two Files Two Column Comparison

    You are very correct.
  14. beaster

    Two Files Two Column Comparison

    It looks good, I have not tried it yet though. Can you show me how to it should be written if I want to run it from the command line? Like: nawk -f file file
  15. beaster

    Two Files Two Column Comparison

    I need help with a script to compare two files. I know the command "diff" but I think it needs to be a bit more complex to do what I want. I have two files. They are in the same directory. They both have similiar text in them. 1st File: file1 2nd File: file2 The newest file is file1 and...

Part and Inventory Search

Back
Top