Hello
I have the next problem. I have a output with this format:
I need to do a cut:
/SERVER01-02/=user/01/f0/=XXXXX
But the number of characters is different betwen lines
I trie use nawk (awk doesn't work in this version of solaris) unsuccessful.
Could you helpme?
Thanks
Moderator's Comments:
code tags please
---------- Post updated at 06:10 AM ---------- Previous update was at 05:25 AM ----------
Mmm I'm trying and:
nawk '/busti/{print $8}' ruta.txt
With this result
I only need extracts
Could you helpme?
Thanks
Last edited by jim mcnamara; 07-23-2012 at 07:30 AM..
Run the command on the original file (I think it's ruta.txt)..not on the records you've extracted. And, awk, by no means, will change your original file, you'll need to redirect the output somewhere.
Thanks Elixir
Yes, I run the command on the original ruta.txt, with the same result. Any result :-(
The origina ruta.txt contains:
After to do
The result is:
If exceute your command, the result is:
Thanks for your reply. I continued researching
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Hi.. i am running nawk scripts on solaris system to get records of file1 not in file2 and find duplicate records in a while with the following scripts -compare
nawk 'NR==FNR{a++;next;} !a {print"line"FNR $0}' file1 file2duplicate - nawk '{a++}END{for(i in a){if(a-1)print i,a}}' file1in the middle... (12 Replies)
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)