Search Results

Search: Posts Made By: RudiC
178
Posted By RudiC
How about awk '{for (i=1; i<=NF; i++)...
How about
awk '{for (i=1; i<=NF; i++) {$i=(int(.5+rand()))?$i:"b"; SUM+=x}} 1' file
b a b a b a b a b a
b b b b b a a b b b
296
Posted By RudiC
Try awk ' L0 {printf "%s" OFS,...
Try
awk '
L0 {printf "%s" OFS, L0
}
!X[$1,$2] && L0 {if (SAME) print DLT
else print "0.00", "0.00"
SAME = 0
...
308
Posted By RudiC
Looks like there's no route to host, an port 20...
Looks like there's no route to host, an port 20 is not open.
393
Posted By RudiC
Given the input is exactly as given in post #1,...
Given the input is exactly as given in post #1, i.e. no more nor less than three weeks between the two period dates, try (running awk thrice and date twice only, and opening / reading file twice as...
467
Posted By RudiC
Executing the awk script in your post #15 with...
Executing the awk script in your post #15 with exactly the data given in that post, I get
LOTC cluster
AMF cluster
LOTC cluster state is ok
AMF cluster state is ok


So I presume you might...
308
Posted By RudiC
I'm lost. You - traceroute and ping...
I'm lost. You


- traceroute and ping 203.112.144.202
- ftp to 164.52.194.12
- ftp to 172.16.80.80 (which, in turn, is taken as source when pinging)


Pls tell us which is the PC, the AIX...
178
Posted By RudiC
How "randomly" should those replacements occur?...
How "randomly" should those replacements occur? Exactly half? Half per line or per total replacements over all lines?
98
Posted By RudiC
No -E necessary: $ cat file text4 ...
No -E necessary:


$ cat file
text4
text5
text11
file13
file15
text16

$ echo {text,file}{4..16}$'\n' | grep -vffile



EDIT: or, try
grep -v -etext4 -etext5 -etext11 -efile13...
450
Posted By RudiC
Do you want the End pattern excluded? Try ...
Do you want the End pattern excluded? Try



awk '/Start/,/End/ {if (/12345/) P = 1; if (/End/) P = 0} P' file
12345
.
. EDIT: included?

awk '/Start/,/End/ {if (/12345/) P = 1; if (P)...
158
Posted By RudiC
Not sure this works with all tr versions: ...
Not sure this works with all tr versions:


echo "HiringManager_RHMC, DirectSupervisor_RHMC, ProcessServerReadAccess_ST" | tr -s ', ' '\n'
HiringManager_RHMC
DirectSupervisor_RHMC...
311
Posted By RudiC
If you (roughly) know what to exclude (here:...
If you (roughly) know what to exclude (here: .jsp), try
find /tmp/custom -type f \( -name '*.xml?*' -o -name '*.js[^p]*' -o -name '*.jsp?*' \) | grep -v '/BACKUP/'
/tmp/custom/moht.xml_tmp...
311
Posted By RudiC
You should find files with at least one more char...
You should find files with at least one more char after the extension, then:


find /tmp/custom -type f \( -name '*.xml?*' -o -name '*.js?*' -o -name '*.jsp?*' \) | grep -v '/BACKUP/'...
467
Posted By RudiC
You need to copy the spaces araound " UNLOCKED...
You need to copy the spaces araound " UNLOCKED ENABLED " as well (c.f. post #6).
467
Posted By RudiC
It does the same as your code does, except once a...
It does the same as your code does, except once a line failed, you don't need to check further. That's what the OK array, indexed by the respective cluster state, is for. Same logic as before for the...
420
Posted By RudiC
Not being a native speaker, I think this is not a...
Not being a native speaker, I think this is not a rectangle. It is a parallelogram or a rhombus / rhomboid.


This is a coordinate pair, a point in a plane. A line needs at least one more point.
...
467
Posted By RudiC
Looks like your result in post #7 is EXACTLY what...
Looks like your result in post #7 is EXACTLY what you wanted...
467
Posted By RudiC
A bit difficult to believe. What's your input...
A bit difficult to believe. What's your input data?
467
Posted By RudiC
A "reverse condition" was not specified in the...
A "reverse condition" was not specified in the original post.



Howsoever, try

awk '

/cluster state:/ {print $1, $2
OK[$1] = 1
...
467
Posted By RudiC
You're not too far off for the first part. Try...
You're not too far off for the first part. Try this small adaption of your attempt (and its AMF extension, btw):
awk '

/cluster state:/ {print $1, $2
OK[$1] = 1
...
388
Posted By RudiC
I think your small request more can easily be...
I think your small request more can easily be satisfied along the lines shown by rdrtx1 and me...
246
Posted By RudiC
Try as well sort -k1,1 -k9nr file | uniq -w16 ...
Try as well
sort -k1,1 -k9nr file | uniq -w16
chr1_16857_17742 - chr1 14404 29570 "ENST00000488147.1"; "WASH7P"; - 885
chr1_16857_18061 - chr1 ...
388
Posted By RudiC
For your "max bin" question, try awk...
For your "max bin" question, try

awk -v"MAX=20" '
BEGIN {delta = (delta=="")?2:delta
MXBCK = (MAX / delta) + 1
}

{bucketNr = int(($1+delta) / delta)
if...
388
Posted By RudiC
How far would this small adaption to your code...
How far would this small adaption to your code get you:
awk '
BEGIN {delta = (delta=="")?2:delta
}

{bucketNr = int(($1+delta) / delta)
cnt[bucketNr] += $2
...
276
Posted By RudiC
Fine for a first approach. Any thoughts on how to...
Fine for a first approach. Any thoughts on how to continue with your further steps? Not necessarily in commands / script; plain English will suffice...
276
Posted By RudiC
Any attempts / ideas / thoughts from your side?
Any attempts / ideas / thoughts from your side?
Showing results 1 to 25 of 500

 

Featured Tech Videos

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