Search Results

Search: Posts Made By: vgersh99
286
Posted By vgersh99
eval awk ...
eval awk ...
304
Posted By vgersh99
the usual approach: awk 'FNR==NR...
the usual approach:

awk 'FNR==NR {f1[$1]=$0;next} $1 in f1 {print $0, f1[$1]}' all-Vms-1.txt all-vm-unix.txt
354
Posted By vgersh99
Strange... Given your sample input in post#1...
Strange...
Given your sample input in post#1 and using RudiC's code, I get:

{"NAME":"QLogic 570x/571x Gigabit Ethernet Driver",
"VERSION":"11.11,REV=2009.11.11",
"BASEDIR":"/"}
{"NAME":"QLogic...
354
Posted By vgersh99
if on Solaris, use either nawk or...
if on Solaris, use either nawk or /usr/xpg4/bin/awk
433
Posted By vgersh99
why are you using total in 2 diff context? ...
why are you using total in 2 diff context?
total[$1] += $5
and
total=Homework+Lab+Final+Quiz+Survey
Also sum[$1] += $4 is indexed by a single index - not by $1$2
399
Posted By vgersh99
how about: awk 'FNR==NR{f1[$2]=$0;next} $1...
how about:

awk 'FNR==NR{f1[$2]=$0;next} $1 in f1 {print $0, f1[$1]}' FS='"' FILE FS=' ' FILE1
542
Posted By vgersh99
how about: /home/oracle> sed -e...
how about:

/home/oracle> sed -e "s/[0-3][0-9]-($(locale abmon | tr 'a-z;' 'A-Z|'))-[12][09][0-9][0-9]/"'01-OCT-2019'"/" test4.txt
Forum: Shell Programming and Scripting 3 Weeks Ago
771
Posted By vgersh99
echo 'QREMOTE(BOS.FOS.T.CDG.MEDGTOC.01)...
echo 'QREMOTE(BOS.FOS.T.CDG.MEDGTOC.01) CLUSTER(CLENTT1) DEFBIND(NOTFIXED) DEFPSIST(YES) DESCR(Cargo dangerous goods queue) RQMNAME(CLCRGT1) RNAME(BOS.FOS.T.CDG.MEDGTOC.01) XMITQ( )' | sed...
606
Posted By vgersh99
pls provide the output of (using code tags): cat...
pls provide the output of (using code tags): cat -vet myFile
606
Posted By vgersh99
$ sed -n '/<p class="margin-bottom-0">/,/<\/p>/p'...
$ sed -n '/<p class="margin-bottom-0">/,/<\/p>/p' myFile
<p class="margin-bottom-0">
text1
<br>
text2
<br>
<br>
text3
</p>
439
Posted By vgersh99
man crontab yields (among others): The...
man crontab yields (among others):

The "sixth" field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character,
will be...
522
Posted By vgersh99
Look at the bottom of this thread: 10 More...
Look at the bottom of this thread: 10 More Discussions You Might Find Interesting for suggestions.
5
sed
202
Posted By vgersh99
how about for starters: sed -n '/[ ]*JOB[...
how about for starters:

sed -n '/[ ]*JOB[ ]*/,/JOBSTEPREPORT/p' myFile
Forum: Shell Programming and Scripting 4 Weeks Ago
1,484
Posted By vgersh99
you said you're under Cygwin's bash. Looks like...
you said you're under Cygwin's bash.
Looks like Cygwin (at least mine) is using Windows' native ssh client:

$ which ssh
/cygdrive/c/WINDOWS/System32/OpenSSH/ssh

Is that the case with you as...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,484
Posted By vgersh99
try: read strCPROC strIPROC strAPROC...
try:

read strCPROC strIPROC strAPROC <<<$(ssh -n -T hscroot@$HMC "lshwres -r proc -m $strIDENT --level sys -F 'configurable_sys_proc_units installed_sys_proc_units...
223
Posted By vgersh99
how about this for the starters: find ....
how about this for the starters:

find . -type f -name '*.*' | awk -F. '{a[$NF]++} END {for (i in a) print FS i ": " a[i]}'
618
Posted By vgersh99
how about: sed 's/ *//g;s/^/select * from /' ...
how about: sed 's/ *//g;s/^/select * from /' Tablist.txt
618
Posted By vgersh99
As always, where exactly are you stuck with this?
As always, where exactly are you stuck with this?
708
Posted By vgersh99
awk -F'[;]' '{ t[$1 OFS $2]+=$3 } END { for (i in...
awk -F'[;]' '{ t[$1 OFS $2]+=$3 } END { for (i in t) print i, t[i] }' myFile
For the 'Also' part... please post sample representative input.
1,103
Posted By vgersh99
you'll have work on your logic (I'll leave it as...
you'll have work on your logic (I'll leave it as an exercise for you), but your modified attempt is:

awk -F'|' 'FNR>1 && NF==2{
if ($2 ~ "^ *UP *$")
print "Node" $1 "is" $2 ;...
1,186
Posted By vgersh99
if you have access to gawk, check man gawk and...
if you have access to gawk, check man gawk and search for FIELDWIDTHS.
if not, you can simulate FIELDWIDTHS yourself.
1,529
Posted By vgersh99
worked just fine with my test harness files...
worked just fine with my test harness files quoted previously!
1,529
Posted By vgersh99
this is gawk specific AND it does not count the...
this is gawk specific AND it does not count the unique lines correctly.
How about another version:

gawk '{l[$0]++} ENDFILE {for (i in l) {if (l[i]==1) u++;t+=l[i]} print t, u, FILENAME; delete l;...
1,529
Posted By vgersh99
how about this: #!/bin/ksh wc -l * |...
how about this:

#!/bin/ksh

wc -l * | sed '$d' | sort | while read lines file junk
do
echo $lines $(sort < $file | uniq -u |wc -l) $file
done
2,697
Posted By vgersh99
nawk on Solaris doesn't support regex or...
nawk on Solaris doesn't support regex or non-single char as RS. In other words, only single chars for RS.

You can try your attempt with Solaris' /usr/xpg4/bin/awk
The alternative (not tested as...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy