Search Results

Search: Posts Made By: RudiC
164
Posted By RudiC
File sizes are included in my cksum. For climbing...
File sizes are included in my cksum. For climbing down the dir tree, try
cksum * */* */*/* |& grep -v "BACKUP\|STORE\|LOGGER\|cksum"
268795035 355 file1
113460914 19 file2
164
Posted By RudiC
Compare performance of cksum /tmp/moht/* | grep...
Compare performance of
cksum /tmp/moht/* | grep -v "BACKUP\|STORE\|LOGGER"
154
Posted By RudiC
Might also work: tac file | awk -F" +" '{TMP =...
Might also work:
tac file | awk -F" +" '{TMP = $0 DL TMP; DL = "|" } /^[^ ]/ {print TMP | "sort -nrk5,5" ; TMP = DL = ""}' | tr '|' '\n'
133
Posted By RudiC
Your input file is not too consistent in its...
Your input file is not too consistent in its usage of spaces as field separators. It has one or two between fields, one up to six from BOL to $2 if $1 is missing, and zero or one at EOL. That's what ...
101
Posted By RudiC
Pls show how and where "SERVER-B ... will delete...
Pls show how and where "SERVER-B ... will delete same". Will all files 1 - 4 be deleted from server1 if all went well? Will they also be deleted from server2 if all went well? Does server-B have a...
133
Posted By RudiC
Try tac file | awk -F" +" '{SUM += $4} $1 {$5 =...
Try
tac file | awk -F" +" '{SUM += $4} $1 {$5 = SUM; SUM = 0} 1' | tac
192
Posted By RudiC
I don't think you can have a swiss army knife...
I don't think you can have a swiss army knife solution to a wild card problem. Please decently describe the data conents / structure in all cases, for every case, in detail. Are above the only three...
131
Posted By RudiC
Try also IFS="|" read -a A1 <file1 IFS="|"...
Try also
IFS="|" read -a A1 <file1
IFS="|" read -a A2 <file2
IFS=$'\n'
<<< "${A1
}$IFS${A2
}$IFS${A2
}" sort | uniq -u
B
D
E
G
H
STATUS
119
Posted By RudiC
Please become accutomed to supplying decent and...
Please become accutomed to supplying decent and sufficient information whereupon an analysis can be started. Like contents of the EXAMPLE variable, the (meaningful) code around that if construct,...
133
Posted By RudiC
Please become accustomed to supplying decent and...
Please become accustomed to supplying decent and sufficient information. "But it didn't work." is not a good starting point for an analysis beyond guessing. Is That file created at all? Is it empty?...
128
Posted By RudiC
Would the $BASHPID help? Like ps hocomm...
Would the $BASHPID help? Like
ps hocomm p$BASHPID
133
Posted By RudiC
Why not for ... do ... done >...
Why not

for ...
do ...
done > DAS_VetFed.txt
166
Posted By RudiC
Try adding a field separator after the publishing...
Try adding a field separator after the publishing year:
awk '{sub (/[0-9][0-9][0-9][0-9]\.@: /, "&|"); $1=$1} 1' RS= FS="\n" OFS=\| file | sort -t"|" -k3,3r -k4,4 | awk '$1=$1' FS="|" OFS="\n"...
182
Posted By RudiC
On top of what balajesuri already said, I don't...
On top of what balajesuri already said, I don't think {$run} will yield what you expect it to yield, but it also would not yield what you posted ( [5] ). I'd expect something like {5}, rather. Same...
136
Posted By RudiC
Would this do? grep ...
Would this do?
grep '^[^#]*Listen.*[^0-9]443\([^0-9]\|$\)' file
166
Posted By RudiC
Like so? awk '$1=$1' RS= FS="\n" OFS=\| file |...
Like so?
awk '$1=$1' RS= FS="\n" OFS=\| file | sort -t"|" -k3,3 | awk '$1=$1' FS="|" OFS="\n" ORS="\n\n"
191
Posted By RudiC
Try sed '/^PASS_MIN_LEN/c\PASS_MIN_LEN 12'...
Try
sed '/^PASS_MIN_LEN/c\PASS_MIN_LEN 12' /etc/login.defs
175
Posted By RudiC
Tryawk ' NR > 1 {for (i=5; i<=NF; i++) {n =...
Tryawk '
NR > 1 {for (i=5; i<=NF; i++) {n = split ($i, T, ",")
for (j=1; j<=n; j++) SUM += T[j]
$i = SUM/n
...
238
Posted By RudiC
I don't think either of a/src, b/src, or...
I don't think either of a/src, b/src, or x/y/dataLu/src is an absolute path; they all start downwards from your current working directory, $PWD.


Just in case neither the readlink nor the...
152
Posted By RudiC
Try ARRAY=($(ps -eo pid,etime,command | grep -o...
Try
ARRAY=($(ps -eo pid,etime,command | grep -o "\-Xmx[0-9M]*.\{,30\}/opt/rather/[^ /]*" | grep -o "\-Xmx[0-9M]*\|[^ /]*$" | tr "\n" " "))
echo ${ARRAY[@]}
-Xmx2048M bar -Xmx3002M raal
152
Posted By RudiC
With grep's greedy regex matching its not easy to...
With grep's greedy regex matching its not easy to lay hands on the activity if its "name is after "/opt/rather/". There may be better solutions than these ones that rely on the input lines'...
251
Posted By RudiC
What would you expect? The first greps the lines...
What would you expect? The first greps the lines with "done" in them and pipes it --- into nowhere! As the second opens the input file again to read from it and discards its stdin. You've been given...
251
Posted By RudiC
With grep and friends you'll get one count per...
With grep and friends you'll get one count per run, so you'll have to go through the file twice. Might not be a problem with small files, but resource consumption increases with sizes. Taylor your...
244
Posted By RudiC
Did you look into the helpful links at the bottom...
Did you look into the helpful links at the bottom of this page under "10 More Discussions You Might Find Interesting"?



Howsoever, for your first question, try


$ date --date='07/20/2019'...
193
Posted By RudiC
How far would this get you: awk '{TMP[$4]=$5;...
How far would this get you:
awk '{TMP[$4]=$5; VAL[$4]+=$7; CNT[$4]++} END {for (t in TMP) {i = t; gsub (/[:-]/, OFS, i); print i, TMP[t], VAL[t]/CNT[t]}}' OFS="\t" file
chr16 2097885 2097890 ...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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