Search Results

Search: Posts Made By: RudiC
97
Posted By RudiC
"asap" is a term highly deprecated in these...
"asap" is a term highly deprecated in these fora...



With either script, I get

rl 3 xpicrecovery 5 5
rl 4 xpicrecovery 5 5
rl 5 xpicrecovery 5 5


We need more to start analysing. Is it...
Forum: Shell Programming and Scripting 4 Hours Ago
97
Posted By RudiC
Although Peasant's proposal delivers the desired...
Although Peasant's proposal delivers the desired output, it doesn't check the XPIC status but, if disabled, relies upon the missing Autorestore entry and silently discards the XPIC status.


Try...
156
Posted By RudiC
How about (not THORUOGHLY tested!): $ L1=( a...
How about (not THORUOGHLY tested!):

$ L1=( a b c d i f gg )
$ L2=( 1 2 13 )
$ for i in ${!L1[@]}; do echo ${L1[i]}${L2[i%${#L2[@]}]}; done
a1
b2
c13
d1
i2
f13
gg1
Pipe through paste -sd"...
142
Posted By RudiC
[^[:blank:]#;] # ONE char non-blank,...
[^[:blank:]#;] # ONE char non-blank, non-#, non-;
142
Posted By RudiC
Don't worry, your overcomplicated regex doesn't...
Don't worry, your overcomplicated regex doesn't match anything reasonable in your file, if that is what you're after (not clear from your spec). Even uncommented lines with # removed (which I added...
451
Posted By RudiC
OK, (sigh), dealing with duplicates in iplist,...
OK, (sigh), dealing with duplicates in iplist, empty lines in data, and IPs not in iplist. Be aware that this is NOT a turnkey solution handling any special case that you / your data sources may come...
451
Posted By RudiC
I give up. Your new iplist is full of duplicates,...
I give up. Your new iplist is full of duplicates, your data have IPs not covered in iplist, and your data have at least one empty line responsible for the "bad array subscript" error (on stderr, by...
335
Posted By RudiC
Difficult to believe with unmodified input files....
Difficult to believe with unmodified input files. Pls report back your findings.


A regex using "alternation" as brought into play in rbatte1's post #4 will be the most efficient approach, as...
451
Posted By RudiC
So you skipped the | cut -f2-?
So you skipped the | cut -f2-?
228
Posted By RudiC
Try also awk -F\| ' {LN[NR] = $0 ...
Try also
awk -F\| '
{LN[NR] = $0
L = length($3)
if (L>MX[$2]) {MX[$2] = L
D3[$2] = $3
}
}
END {for...
451
Posted By RudiC
This is what I get on stdout after eliminating...
This is what I get on stdout after eliminating duplicates in your iplist, and empty lines in your data:
10.9.9.25
-rwxr-xr-x user1 2019-12-28 16:32 /tmp/TomChrgBatch.txt 3953673532
-rwxr-xr-x...
451
Posted By RudiC
Of course not. You are not...
Of course not.




You are not debugging MY code, but your code.


If you modify a working, tested code snippet, you better know EXACTLY what you are doing.
451
Posted By RudiC
Difficult to believe. How long would a string...
Difficult to believe. How long would a string need to be to buffalo awk?


What would that be, "non seek"?


How about
declare -A IPASS
IFS=,
for i in $iplist; do IPASS[$i]=${#IPASS[@]}; ...
451
Posted By RudiC
awk OK? Try awk -v"IPL=$iplist" ' BEGIN ...
awk OK? Try
awk -v"IPL=$iplist" '
BEGIN {for (MX=n=split(IPL, T, ","); n; n--) IPS[T[n]] = n
}
$1 in IPS {SORTC = IPS[$1]
DONE[$1] = 1
...
275
Posted By RudiC
A decent specification will help everybody to...
A decent specification will help everybody to save time and effort. Try


sed '/&@@10.10.10.10/ s/^/#/' file
275
Posted By RudiC
No, it is not. That is not what I...
No, it is not.


That is not what I proposed. Please specify EXACTLY what you need.
275
Posted By RudiC
Try sed 's/^/#/' file
Try
sed 's/^/#/' file
275
Posted By RudiC
Any attempts / ideas / thoughts from your side?
Any attempts / ideas / thoughts from your side?
249
Posted By RudiC
Or printf "%s%0*d\n" ${X} $((9-${#X})) 0 ...
Or
printf "%s%0*d\n" ${X} $((9-${#X})) 0
245700000
printf "%s%0$((9-${#X}))d\n" ${X}
245700000
314
Posted By RudiC
The ssh daemon is relevant on the target server....
The ssh daemon is relevant on the target server. Compare e.g. ssh.conf.
358
Posted By RudiC
On top of vgersh99's comments to your syntax, you...
On top of vgersh99's comments to your syntax, you also might want to consider a slightly different approach to the logics, which translates to


- if FILE2 and FILE3 exist, and
...- the weekday...
335
Posted By RudiC
Nice approach indeed! Could be curtailed to ...
Nice approach indeed!
Could be curtailed to
sed -r "/'($(paste -sd\| file2))'/s/^C//" file1, including the item list file as well.
314
Posted By RudiC
Well - compare configurations and report back,...
Well - compare configurations and report back, that is...
335
Posted By RudiC
Try awk -v"SQ='" ' FNR == NR ...
Try


awk -v"SQ='" '
FNR == NR {PAT[NR]="^C.*" SQ $0 SQ
MX = NR
next
}
{for (i=1; i<=MX; i++) if ($0 ~ PAT[i]) {sub...
314
Posted By RudiC
Sure the setup / configuration is identical on...
Sure the setup / configuration is identical on the two linux machines? The authentication processes don't indicate they are:


$ diff -by file[12] | grep "[<>|]"
...
Showing results 1 to 25 of 500

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