Search Results

Search: Posts Made By: RudiC
181
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...
443
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.
...
491
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...
491
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
...
491
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
...
412
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...
412
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...
412
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
...
293
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...
327
Posted By RudiC
Are you able to live with "0.00 0.00" in a pair's...
Are you able to live with "0.00 0.00" in a pair's first line? Try
awk '
{printf "%s" OFS, $0
}
!X[$1,$2] {print "0.00", "0.00"
}
X[$1,$2]++...
544
Posted By RudiC
A one or two line data sample would be nice. ...
A one or two line data sample would be nice.


The if (...); will do nothing.
The print CONDITION will print an empty entity as the variable is not defined.


Your idea / approach will not...
678
Posted By RudiC
You want the 3rd (...) newest file? Try NOT...
You want the 3rd (...) newest file? Try NOT reversing the sorting order
ls -lt *.conf | sed -n "${1}p"
Forum: Shell Programming and Scripting 2 Weeks Ago
450
Posted By RudiC
Try - remember you wanted a space! - $ awk...
Try - remember you wanted a space! -

$ awk '/inlineifset/ {sub (/@inlineifset{mrg, @opar{@bullet{}/, " "); print}' RS= ORS="\n\n" file
@subsubsection ObsPy LibmSeed License Problem,,,,}}
...
435
Posted By RudiC
Some sort versions - my is $ sort --version...
Some sort versions - my is

$ sort --version
sort (GNU coreutils) 8.30

- offer the option (man sort)

so it would yield$ sort -M file
Jan 20 16:27:38 2020
Jan 20 16:29:51 2020
Jan 20...
455
Posted By RudiC
What did you try? Where and how did it fail? ...
What did you try? Where and how did it fail?
What do you get if you specify /path/to/target/*txt?
688
Posted By RudiC
How far would this get you, printing the weighted...
How far would this get you, printing the weighted total for each student. The weight per category is delivered in file1 in the form you posted :
awk '
FNR == NR {WEIGHT[$1] = $3
...
Forum: Shell Programming and Scripting 2 Weeks Ago
515
Posted By RudiC
How about getting your bash syntax right, first?...
How about getting your bash syntax right, first? What you post can't possibly run...

--- Post updated at 18:33 ---

OK, trying to guess what you're after, and making some assumptions, how about...
556
Posted By RudiC
Is awk a MUST? Or would e.g. paste do as well?
Is awk a MUST? Or would e.g. paste do as well?
665
Posted By RudiC
For the fun of it; the (admitted lengthy)...
For the fun of it; the (admitted lengthy) "command substitution" finds the last line prior to the date/time given in DT1 on which sed needs to quit:
DT1="Jan 19 21:10:00"
sed "/$(echo "$DT1" | cut...
Forum: Shell Programming and Scripting 3 Weeks Ago
246
Posted By RudiC
What's your locale, esp. the LC_COLLATE variable?...
What's your locale, esp. the LC_COLLATE variable?


Try that command prefixed with LC_ALL=C.
566
Posted By RudiC
Looks like you have a trailing empty line in your...
Looks like you have a trailing empty line in your file. And, you seem to replace $3 now, not $4.
321
Posted By RudiC
How about reading (, understanding), and...
How about reading (, understanding), and following / answering post #3?
574
Posted By RudiC
is not too good a starting point for an analysis....
is not too good a starting point for an analysis.



Yes - start with a decent request - details like misbehaviour, error messages, file / directory structures, input data, execution logs, ...
321
Posted By RudiC
Your spec seems a bit incomplete, pls add more...
Your spec seems a bit incomplete, pls add more details:
- how to select / reject the devices (e.g. 172.17.168.227 is missing in your desired output)?
- how to fill items not yet found when...
526
Posted By RudiC
None of the solutions so far covers your other...
None of the solutions so far covers your other condition "if the 3rd column is empty it shouldn't delete that line". Adapt your own solution like

awk -F "^" '$3=="|" || $4!="|"' fileNote that...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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