Search Results

Search: Posts Made By: pp56825
45,578
Posted By pp56825
Thanks for help, it's working Do you know how...
Thanks for help, it's working
Do you know how to substitute in awk
in field $5 replace all ":" with null string?
45,578
Posted By pp56825
this is example, my input contain more then one...
this is example, my input contain more then one column
45,578
Posted By pp56825
I want to sort all lines in input - except first...
I want to sort all lines in input - except first [ header ] but i want header on output also.
Example file:
Time
123
1245
122134
123412
123123
1243123
12334
123123

- Time line is header...
45,578
Posted By pp56825
How to sort standard input without first line < Header >
Do somebody have idea How to sort standard input without first line which in my case it's header
Example:
Cnt|VT |STAT|Date |Time |From |Alert Message ...
9,189
Posted By pp56825
If i move awk prog to file i have now such error:...
If i move awk prog to file i have now such error:
ps -ef | awk -f proc.awk -v level=250 -v inst=1 "/${p}.*${w}/"
awk: Cannot find or open file /ifstart.*turuat1/.
The source line number is 1.
9,189
Posted By pp56825
One more this is working: ps -ef | awk -v...
One more
this is working:
ps -ef | awk -v level=250 -v inst=1 '/ifstart.*turuat1/ { nr++; if ($4 > max ) {max=$4}}; END { if ( nr != inst ) {r=1} else {if ( max > level ) r=2 }; print r }'

but...
9,189
Posted By pp56825
Thanks i have
Thanks i have
9,189
Posted By pp56825
One more help needed. how to simulate in awk...
One more help needed.
how to simulate in awk grep -i [ not case sensitive search ]
???

awk "/${a}.*${b}.*${c}/" file2.txt

Regards
Peter
7,772
Posted By pp56825
GID & UID for HP-UX ?
Hi,
can somebody tell me how to make directoriy in which all files will be generated as dir owner ?

I'm able to add GID [chmod g+s ] for directory group and files have group id like folder , but...
2,248
Posted By pp56825
merging of 2 files AWK - part 2
i have try , but i think i will never learn awk :(
now i have 2 files :

a
1:aaa:2:aaa1
2:bbb:2:bbb1
3:ccc:3:ccc1

b
aaa:2
bbb:0
ccc:3

output:
for all lines where a.$2 == b.$1
i want...
1,601
Posted By pp56825
awk trik help needed
i have file like:
test.txt:
3:<:1
how to write awk program which will use field $2 as a condition and compare $1 with $3
somethink like:
awk -F":" '{if ($1 $2 $3) print}' test.txt #this not...
10,215
Posted By pp56825
You can select SPID from v$session and v$process...
You can select SPID from v$session and v$process and insert it to table:
select p.spid "Process"
from v$session s, v$process p
where s.paddr = p.addr and audsid = userenv( 'sessionid' );
9,189
Posted By pp56825
Thanks, it's working
Thanks, it's working
9,189
Posted By pp56825
awk as grep with variables
i have such awk working fine but how to use variable instead of strings

awk '/asdasd.*asda.*asdasd/' file2.txt

This is not working:
awk '/${a}.*${b}.*${c}/' file2.txt

Thanks & regards...
5,972
Posted By pp56825
yes i have ; so where i can read about...
yes i have ; so where i can read about differencess between ksh and ksh93 ?
5,972
Posted By pp56825
What are the main differences between zsh and ksh...
What are the main differences between zsh and ksh ? do you know some web page where i can read about those diffs.
I have some old version of ksh, and i'm not a SE and can't install new one.
...
5,972
Posted By pp56825
this is very usefull: file: sda:asd:asd ...
this is very usefull:

file:
sda:asd:asd
asd:awq:qwe
das:wer:tyu
asd:wer:123
asd:234:456

export IFS=":"
while read a b c;do echo $a $b $c;done < test
5,972
Posted By pp56825
Maybe somebody know some page or forum with shell...
Maybe somebody know some page or forum with shell scripting optimalization ? or some tips and triks
5,972
Posted By pp56825
What if the fileds in line are separated by : or...
What if the fileds in line are separated by : or ~ ?

found that i can export IFS=":".

Ghostdog thanks for this set trick.
5,972
Posted By pp56825
How to extract field from variable more efective
Hi,
I know that simple way to do this is var=`echo $line | awk '{print $5}'`
But maybe there is shorter way to do this ?

Also maybe there is some way to assign all fileds from line separated by...
12,509
Posted By pp56825
Yes i know that now our primary key will be $8 ...
Yes i know that now our primary key will be $8
so now awk will looks like that:
BEGIN {
printf "%-3s|%-10s|%-4s|%-9s|%-9s|%-9s|%-70s|%-9s|%-s\n", "Cnt", "VT", "STAT", "Date",...
12,509
Posted By pp56825
Thanks again Radoulov, Last awk program works...
Thanks again Radoulov,
Last awk program works perfecly fine, this is what i need,
can you tell me how to substitute $2 and $3 from file2 to file1, so then VT and STAT will be display from file2...
20,748
Posted By pp56825
try to use nawk or /usr/xpg4/bin/awk
try to use nawk or /usr/xpg4/bin/awk
28,159
Posted By pp56825
from pl/sql you can do something like this, i'm...
from pl/sql you can do something like this, i'm not sure if will work with non numeric values [ but you can try ] i use this to pass exit status if sql failed.

sample.sql

variable status...
12,509
Posted By pp56825
Hi, thanks for helping me, i try to explain it...
Hi, thanks for helping me, i try to explain it the best i can,

AWK FILE : match_files2_o.awk

BEGIN { printf "%-5s|%-10s|%-9s|%-9s|%-9s|%-70s|%-9s|%-s\n","Count", "VT", "Date",...
Showing results 1 to 25 of 32

 
All times are GMT -4. The time now is 12:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy