Search Results

Search: Posts Made By: disedorgue
Forum: Programming 01-29-2020
12,050
Posted By disedorgue
Hi, You have bad declare TESTDIR variable (...
Hi,
You have bad declare TESTDIR variable ( Forgot '$' for '(OS)' ) :
TESTDIR = ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)
2,799
Posted By disedorgue
Hi, awk '/^-- Current Database:/...
Hi,



awk '/^-- Current Database:/ {A++}{print A" "$0}' ==> put a flag (a number follow of space) on each line of each Database block. for a given block, we have the same flag on each line,...
2,799
Posted By disedorgue
It's a little few hard and the result is little...
It's a little few hard and the result is little few different (highest number then highest aphabetic so) :
awk '/^-- Current Database:/ {A--}{print A" "$0}' /tmp/file.txt | LC_COLLATE=C sort | uniq...
2,799
Posted By disedorgue
Hi, Maybe as: awk '/^-- Current Database:/...
Hi,
Maybe as:
awk '/^-- Current Database:/ {A++}{print A" "$0}' file.txt | LC_COLLATE=C sort | uniq -c | sed 's/ *\([0-9]\+\) [0-9]\+ /\1 /;/-- Current Database:/s/^[0-9]\+ //'
Regards.
2,360
Posted By disedorgue
Hi, Maybe with sed below but with same resultat...
Hi,
Maybe with sed below but with same resultat give by RudiC:
sed -e 's/.\{7\}\|.\{1,6\}$/_&/g;s/^_//;s/_\(.\)[0-9]*/\1/g' file
Regards.
8,319
Posted By disedorgue
Hi, with sed without -i : file to modify: $...
Hi, with sed without -i :
file to modify:
$ cat /tmp/file.tst
$Paramsoqlfilter=Systemmodstamp > 1900-01-01T00:00:00.000Z
$Paramsoqlfilter=Systemmodstamp > 1900-01-01T00:00:00.000Z...
Forum: Programming 07-23-2018
1,980
Posted By disedorgue
Hi, You must not give self in...
Hi,

You must not give self in super().__init__(self,value).

So super().__init__(value).
1,750
Posted By disedorgue
Hi, When you redirect file descriptor (as 2),...
Hi,
When you redirect file descriptor (as 2), you don't add space between fd and redirect...
So, try with:
version=`"$java_version" -version 2>&1`
and/or
$java_version -version...
5,649
Posted By disedorgue
@RudiC: your solution not work with by example:...
@RudiC: your solution not work with by example: 2018-07-03 20:00:00

Another solution (with perl) :
LOGFILE=/tmp/foobar.log
read a b < <(tail -1 "$LOGFILE" | perl -ne 'use POSIX; ...
5,649
Posted By disedorgue
Hi, Maybe as similar request:...
Hi,
Maybe as similar request: https://www.unix.com/shell-programming-and-scripting/237079-grep-last-30-minutes-log-only.html

Regards.
...
981
Posted By disedorgue
Hi, Maybe something like as : awk...
Hi,

Maybe something like as :
awk -vArgz="$ArgZ" -vArgZB="$ArgZB" 'BEGIN{split(Argz,A,"\n")}
FNR == 1 {Line=0}
FNR == 1 && $0 ~ /^#!/ {Line=FNR}
$0 == A[2] || $0 == A[3]{next}
/^import/...
7,825
Posted By disedorgue
Hi, Maybe, you can to see to side:...
Hi,

Maybe, you can to see to side: https://www.unix.com/unix-for-dummies-questions-and-answers/128363-copy-files-parallel.html

Regards.
6,578
Posted By disedorgue
In your case, you must create 2 functions and 5...
In your case, you must create 2 functions and 5 fifo for work fine:
First function:
func_openssl ()
{
openssl < <(
j=1
while read mdp
do
x=$(( j++ % 2 ))
echo "dgst -sha256 -out...
6,578
Posted By disedorgue
Hi, sha256sum is slower that openssl if it use...
Hi,
sha256sum is slower that openssl if it use correctly, demo:
Three approach to compute 1000 hash and duration:
Your approach:
$ time for i in {00001..01000}; do echo $i| sha256sum ; done | cut...
11,022
Posted By disedorgue
Or with good locale: $ LC_NUMERIC="C"...
Or with good locale:
$ LC_NUMERIC="C" /usr/bin/printf "%'.f\n" "1.14475E+15"
1144750000000000
$ LC_NUMERIC="POSIX" /usr/bin/printf "%'.f\n" "1.14475E+15"
1144750000000000
$...
1,349
Posted By disedorgue
Hi, Maybe (not tested but permit in gawk) : ...
Hi,
Maybe (not tested but permit in gawk) :
gawk -F, '/,'${ThisMonthDOW}' '${ThisMonthMON}' [0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] '${ThisMonthYEA}',/ {
...
2,147
Posted By disedorgue
Hi senhia83, maybe a little bit faster than...
Hi senhia83,
maybe a little bit faster than your second solution:
awk 'NR==1 {C=NF;Y=$0;Z=$4;next}{X[NR]=$0;print Z,$1"__"$2"__"$3,$4}END{for(i=5;i<C;++i){$0=Y;Z=$i;j=1;while(++j<=NR){$0=X[j];print...
2,397
Posted By disedorgue
Hi, You are this problem because when used in...
Hi,
You are this problem because when used in a function, the built-in declare makes local variable. The -g option suppresses this behavior.

A solution could be:
declare -p ARRAY_MAIN_REPO_LEAP...
2,273
Posted By disedorgue
I' m remember that jar command manage also zip...
I' m remember that jar command manage also zip archive and can to work with stream:
$ tar xf arch.tar --to-command="jar tv"
283 Sat Jun 17 01:54:41 CEST 2017 fich1.txt
204 Sat Jun 17...
2,273
Posted By disedorgue
Hi, with gnu tar, you have option...
Hi,
with gnu tar, you have option "--to-commande=COMMANDE", so you can try:
tar --to-commande="unzip -l" -xf TRANS_279.tarRegards.
Forum: Programming 05-11-2017
2,876
Posted By disedorgue
Hi, Example (in red for you) : with T As ...
Hi,
Example (in red for you) :
with T As
(select 123 as c1, 'NY,NJ,CA' as c2 from dual
union
select 124 as c1, 'NY,PA,' as c2 from dual)
SELECT DISTINCT C1, regexp_substr(C2,'[^,]+', 1,...
1,103
Posted By disedorgue
Hi, You can try this: awk -F'\t' '$7 ==...
Hi,
You can try this:
awk -F'\t' '$7 == "PASS" && /AF=([1-9]|[0-9]\.[1-9]|0\.0[3-9])/ && /'"'"'function'"'"':'"'"'(nonsense|frameshift)'"'"'/' file
Regards.
1,402
Posted By disedorgue
No, work just for power of 10 like...
No, work just for power of 10 like 10,100,1000,...
General case could be (example with range 30 by 30):
awk '{X=sprintf("%1.0d",($1+29)/30);A[X*30]+=$2};END{for (i in A){print i,A[i]}}'...
1,402
Posted By disedorgue
Hi, Can you try: awk...
Hi,
Can you try:
awk '{X=sprintf("%i00",($1+99)/100);A[X]+=$2};END{for (i in A){print i,A[i]}}' fileRegards.
3,956
Posted By disedorgue
My solution work with correction of scrutinizer...
My solution work with correction of scrutinizer echo "$s".
Why do you want use FOR loop ?
We use a FOR loop to process a list not a line.
Otherwise, a way to process file line by line with FOR...
Showing results 1 to 25 of 173

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