Search Results

Search: Posts Made By: disedorgue
Forum: Programming 01-29-2020
10,600
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,294
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,294
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,294
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,027
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.
7,814
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,757
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,641
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,422
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,422
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.
...
868
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,695
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,492
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,492
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...
10,725
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,858
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...
1,259
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,229
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,105
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,105
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.
1,073
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.
Forum: Programming 05-11-2017
2,647
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,325
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,325
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,704
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 09:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy