Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Different results from awk, sed, tr
Name: james_falco Date: February 22, 2007 at 12:14:28 Pacific OS: HP-UX B.11.11 U CPU/Ram: 7.99gb Product: HP-UX 9000/800
Comment:
I cannot explain why it gives different results when I try the awk, sed, tr command combination with the same input. (aondufd1)psoftfs:/aon/dev/psoft/FSTST88/autosys>echo ${MailFile} + echo mfint003pr.in1* mfint003pr.in1* (aondufd1)psoftfs:/aon/dev/psoft/FSTST88/autosys/scripts>echo ${MailFile} | awk -F. '{ print $1 "." }' | sed 's/.*\(...\)\..*/\1/' | tr [A-Z] [a-z] | tr -d [0-9] + echo mfint003pr.in1* + awk -F. { print $1 "." } + sed s/.*\(...\)\..*/\1/ + tr -d 1 + tr [A-Z] a 3pr (aondufd1)psoftfs:/aon/dev/psoft/FSTST88/autosys/scripts>cd ../parm + cd ../parm (aondufd1)psoftfs:/aon/dev/psoft/FSTST88/autosys/parm>echo ${MailFile} | awk -F. '{ print $1 "." }' | sed 's/.*\(...\)\..*/\1/' | tr [A-Z] [a-z] | tr -d [0-9] + echo mfint003pr.in1* + awk -F. { print $1 "." } + sed s/.*\(...\)\..*/\1/ + tr -d [0-9] + tr [A-Z] [a-z] pr One big question mark in my head right now. Could someone please help. Thanks. There were no additional profiles loaded when changing directories. just doing the cd command. The output should be 3pr. That would be the correct one, right?
Summary: Hi I have a awk/sed script that I am trying to create to remove lines from a file that I thought I needed to call sed in the awk script. This is what I am trying to do in the script. Please let me ...
Summary: Hi, How can I export variables from awk? For example, I have this script: cat awkscr #start of scr bdf | awk '(/ *% /) && (length($NF)>maxl) {maxl=length($NF)} END {print maxl; export maxl}' echo $max...
Summary: Hi guys, Iam a beginner in awk/sed and need a help on awk/sed. This is my requirement. I have a text file with following entry xx yy zz.txt aa bb cc.txt ee ff gg.txt Iam looking for a program which wi...