Search Results

Search: Posts Made By: RudiC
106
Posted By RudiC
Looks like the well known / infamous DOS line...
Looks like the well known / infamous DOS line terminator problem:


$ RPT=test
$ sed 'p' $RPT
sed: can't read test: No such file or directory
$ RPT=test$'\r'
$ sed 'p' $RPT
: No such file or...
97
Posted By RudiC
OK, try awk -F, '/([0-9]+[\/ :])+[0-9]+/ {split...
OK, try
awk -F, '/([0-9]+[\/ :])+[0-9]+/ {split ($NF, T, /[\/ :]/); $NF = sprintf ("%d-%02d-%02d %d:%d:00", T[3], T[2], T[1], T[4], T[5])} 1' OFS=, file
66
Posted By RudiC
For exactly the one line FASTA example above, try...
For exactly the one line FASTA example above, try
sed '/^>/ !{s/^/CTGA/; s/$/TAGTA/}' file
97
Posted By RudiC
Show your script.
Show your script.
62
Posted By RudiC
Pls. show (some of) your attempts and failures /...
Pls. show (some of) your attempts and failures / errors.
289
Posted By RudiC
@MadeInGermany: Wouldn't that print $0 twice,...
@MadeInGermany: Wouldn't that print $0 twice, once for each of the conditions?
129
Posted By RudiC
In awk, /.../ is (sort of) a regex constant. man...
In awk, /.../ is (sort of) a regex constant. man awk:
So, your expression /$4 ~ "101"/ will try to match exactly this string : $4 ~ "101" - which it won't find in your sample file.
Try
awk -F,...
144
Posted By RudiC
That how we "isolate" the relevant numerical (!)...
That how we "isolate" the relevant numerical (!) sort field from the rest of fields that are considered strings. We're lucky here in that sort seems to disregard the .ts extension when extracting /...
144
Posted By RudiC
Not sure I correctly understand your request. Are...
Not sure I correctly understand your request. Are we talking of sorting a file, or a directory listing? Did you check for the links at the bottom of this page? Given "media_w1956306127_b2500000" is...
120
Posted By RudiC
OK; give it a shot and report back the errors...
OK; give it a shot and report back the errors and/or shortfalls you encounter.
120
Posted By RudiC
Any attempts / ideas / thoughts from your side?...
Any attempts / ideas / thoughts from your side? Did you consider searching tis site, or looking into the links at the bottom of this thread?


Are the entries sorted by timestamp?
191
Posted By RudiC
I can't see what program your regex was written...
I can't see what program your regex was written for. Pls learn to mention ALL relevant details in your spec. For sed, try
sed -n '/<VirtualHost/,/<\/VirtualHost>/...
127
Posted By RudiC
Pls share (and interpret) the error messages you...
Pls share (and interpret) the error messages you certainly get.

is not too good a starting point for doing analyses.


Did you consider the read var1 var2 var3 (builtin) command?


You...
260
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...
260
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...
247
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"...
265
Posted By RudiC
[^[:blank:]#;] # ONE char non-blank,...
[^[:blank:]#;] # ONE char non-blank, non-#, non-;
265
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...
569
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...
569
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...
444
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...
569
Posted By RudiC
So you skipped the | cut -f2-?
So you skipped the | cut -f2-?
322
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...
569
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...
569
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.
Showing results 1 to 25 of 500

 

Featured Tech Videos

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