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: udaybo
  • Content: Threads
  • Order by date
  1. udaybo

    Conditions with AWK

    Hello all I have a file with below data, I need to add a third column as XXXX if the first coloumn (H180620081) last number is "1" and YYYY if the first coloumn last number is "2" Can it be done with AWK, I would appreciate if anyone could help me ou with this. H180620081 31310 H180620082...
  2. udaybo

    Assigning Field names with AWK or SED (Newbie)

    Hello, Please HELP I have a text file in below format, how can I put a header and assign field names to the file with either AWK or SED. STRT~ VA ~23606 ~TM14~8506~1485 (page 1) STRT~ VA ~23662 ~TM17~8362~1783 (page 2) STRT~ VA ~23662 ~TM17~8362~1783 STRT~ VA ~23662 ~TM17~8362~1783 STRT~...
  3. udaybo

    How to sort and put a page break on a text file

    Hello, I have a text file like below example, I would like to do a sort by the last field and put a page break after each group How can I do this using sed or awk VA 23602 TM15 8802 1588 VA 23606 TM14 8506 1486 VA 23662 TM17 8362 1783 VA 23662 TM17 8362 1588 VA 23188 TM60 9188 6091 VA...
  4. udaybo

    Not able to run a AWK script in korn Shell

    Hello, The below AWK script runs fine in unix , but when I try to run the same in korn shell it gives me an error awk 'BEGIN {FS="~"};{printf "%010d%-8s%09s\n",$1,$2,$3}' $DC_FIL/red2.txt > $DC_FIL/red3.txt errors: Syntax error near line 1 Bailing out near line 1 Can anybody please help me...
  5. udaybo

    How to convert Ph # format from (xxx)-xxx-xxxx to xxxxxxxxxx

    Hello all I am new to scripting, I am workng on a text file where I have a field for phone numbers, but these phone numbers are in different format. Can we convert ph# format(xxx)-xxx-xxxx to xxxxxxxxxx. Can anyone please help me with this. Thanks a Lot
  6. udaybo

    How to set fieldsize in a text file using SED or AWK

    Hello Everyone, I am pretty new to Sed and Awk, I am creating a report using Business Objects, its output file is going to be in TEXT format, and I need to format this file into a certain format again using either SED or AWK. I have around 10 fields in the file, for example account number...

Part and Inventory Search

Back
Top