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 bkrike 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: *

  • Users: beaster
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. beaster

    MailX Question

    I have a Sun box that is set up on our network fine. I try to send an email using mailx mailx user@domain.com Subject: Test Test Test . EOT But the mail neve goes through. Is there someplace I should be checking to see why it does not? Or does the domain I am sending to need to be...
  7. beaster

    Script Using Nawk/Awk Help

    I need some assistance building a script to extract data from a log file. The input file is quite large. The input file name is dcp_input.txt The output file should be called dcp_output.txt I need the script to search the input file for the text RXOTG-# right below MO first and send to the...
  8. beaster

    Nawk/Awk To Select Matching Text & Two Rows Above

    I have a tect file that has text in it below. It has hundreds of lines. I need help only looking for text that matches the characters BOE 602 02/03. If it finds a match it also needs to select the text RXOCF-# about two rows above it and output it to an external file called bad_dxu.txt It...
  9. beaster

    How To Carriage Return With Echo and TPIPE

    I need to automate logging into a machine and sending a few commands. But I am having issues with getting it to send a carrige return after the items in quotes after echo. Can someone help me out with it? What I have so far is below: #!/bin/sh tpipe() { sleep 3 echo -e "username&quot...
  10. beaster

    Multiple File Update

    I have a script running on a server which has one file called members.list This file consists of many email addresses that the script uses to mail its output to. The way it is set up is that the members.list file is only in one directory, but I want to put multiple copies in several users...
  11. beaster

    Missing Close Statement

    Here is another file where the close statement is missing, I tried to add it at the bottom, but it did not work. #---------Nawk12-------------- { if (FNR==1) { for (j=1;j<=11;j++) a[j] = 0 fn1 = FILENAME sub(/[^0-9]*/,&quot;&quot;,fn1) fn2 = &quot;pre_build_e&quot; fn1...
  12. beaster

    Using same file# in pre-existing script

    I have the below script that I run like: nawk -f nawk4 file* You will see below that it creates output files called block_obj_# The problem is, it isn't naming the output file with the exact same number as the input file. So input file8 would generate an output file of block_obj_8 Can...
  13. beaster

    Another Only 28 Files (Quick Fix?)

    This script below also will only produce only 27 files. I need it to be unlimited (Or at least 100) BEGIN { outputFileROOT=&quot;rxmop_input&quot; unknownNUM=&quot;999999&quot;; } FNR == 1 { if (match(FILENAME, &quot;[0-9]+&quot;)) output=outputFileROOT substr(FILENAME, RSTART...
  14. beaster

    Find More Than 9 Files With This Script

    The below script creates pre_build files for as many files* it finds in the directory. The problem is that if there are more than 9 files it stops. How can I make it keep going? Sometimes there may be different amounts. #!/bin/ksh for i in *file* do outFile=$(echo ${i} | sed -e...
  15. beaster

    Small Mod to Script Help

    I have the following text: RXOTX-106-0 B00037A ALL GSM1900 ALPHAA 45 RXOTX-106-1 B00037A ALL GSM1900 ALPHAA 45 RXOTX-106-2 B00037A ALL GSM1900 ALPHAA 45 RXOTX-106-3 B00037A ALL GSM1900 BETAA 45 RXOTX-106-4 B00037B ALL GSM1900...
  16. beaster

    Quick Help on Cutting up to :

    I have a file which has text similiar to below: pre_build_j1:RXMOI:MO=RXOTG- pre_build_j1:RXESI:MO=RXOTG-62; pre_build_j1:RXBLE:MO=RXOTG-62; pre_build_j1:RXMOI:MO=RXOCF-62,TEI=62; pre_build_j1:RXMOC:MO=RXOCF-62,SIG=CONC; pre_build_j1:RXMOI:MO=RXOIS-62; pre_build_j1:RXMOI:MO=RXOTF-62,TFMODE=SA...
  17. beaster

    Applying Math Formula to Awk Script

    This is that last final part of my script that involves two math formulas. Now I have learned soooo much from those of you that have helped me in my recent posts. This is the very last final part, and it will be all complete. There are several files called pre_build_i# There is alot of text...
  18. beaster

    Grab Two Fields 1st/Last Under Text

    I was wondering if I could get some help on looking for specific text, and grabbing only a certain range below it. My input file file# (Dont know how may there could be) has the text DCP in it. Directly under this text there will be numbers. The numbers may be any number from 1-24 and may or...
  19. beaster

    awk pattern matching two files

    I have peiced together most of what I could, but am stuck trying to find a way to grab particular fields that I need from two files, then output to a final file. I have a multiple files called antenna# that looks like: RXOTX-11-0 B00227A ALL GSM1900 BETAA 45 RXOTX-11-1...
  20. beaster

    How to read Second field in awk

    In my file file# there is text RXOCF, in the field accross from this text, there is a two digit number. Like 60 or 62. I need to grab that number and find the text TG_TEI in the first pre_build_b# file and replace it, but keep using the end number to the output file pre_build_c# Here is what...

Part and Inventory Search

Back
Top