Search Results

Search: Posts Made By: disedorgue
Forum: Programming 01-29-2020
16,362
Posted By disedorgue
Another error that maybe explain why not work...
Another error that maybe explain why not work when to declare archdir before TESTDIR :
TESTDIR := ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)
Forum: Programming 01-29-2020
16,362
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)
5,568
Posted By disedorgue
Hi, for fun: ( bash, ksh, zsh ): if [ -n...
Hi, for fun:
( bash, ksh, zsh ):
if [ -n "${XX#-}" -a "${XX#-}" = "${XX##*[^0-9]}" ]
then
[ "${XX#-}" -eq 0 ] && echo "$XX: null" || { [ "${XX#-}" = "${XX}" ] && echo "$XX: positif" || echo...
12,533
Posted By disedorgue
Hi, Can you give resultat of command: cat -A...
Hi,
Can you give resultat of command:
cat -A hello
Because I think that your file is not a unix file but a dos file



Regards.
2,454
Posted By disedorgue
Hi, On most file systems, there is no tag on...
Hi,
On most file systems, there is no tag on the creation date...


Regards.
3,720
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,...
3,720
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...
3,720
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.
3,763
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.
9,302
Posted By disedorgue
Ok, but sed -i (or perl -i ) has the same...
Ok, but sed -i (or perl -i ) has the same problem, no ?
9,302
Posted By disedorgue
under linux, the risk can be reduced as long as...
under linux, the risk can be reduced as long as the file descriptor is not closed:
$ exec 3</tmp/file.tst
$ rm /tmp/file.tst
$ cat <&3
$Paramsoqlfilter=Systemmodstamp > 1900-01-01T00:00:00.000Z...
9,302
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...
10,806
Posted By disedorgue
I said me that seek simulation work only in...
I said me that seek simulation work only in memory buffer of max size 64K, but after try with big file (2Go), I saw that perl script is slower that zcat and tail:

50 seconds for zcat | tail -1
1...
10,806
Posted By disedorgue
I know all that, but there may be a significant...
I know all that, but there may be a significant gain because we only create the process once instead of creating 4 * n file.
Where I have a doubt is that perl does not emulate seek by just passing...
10,806
Posted By disedorgue
Hi, here a perl script that output first and last...
Hi, here a perl script that output first and last line, maybe most faster but i'm not sure...
#!/usr/bin/env perl

use strict;
use warnings;
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
...
3,868
Posted By disedorgue
Hi, for fun, only one command sed: sed -e '1{ ...
Hi, for fun, only one command sed:
sed -e '1{
x
s/.*/0/
x
}
/^>/{
x
:d
s/9\(_*\)$/_\1/
td
s/^\(_*\)$/0\1/
s/8\(_*\)$/9\1/
s/7\(_*\)$/8\1/
s/6\(_*\)$/7\1/
s/5\(_*\)$/6\1/
...
2,466
Posted By disedorgue
Hi, Try to replace: if [ ${version} !=...
Hi,
Try to replace:
if [ ${version} != [[:digit:]]]by (space is important) :
if [[ ${version} =~ ^[[:digit:]]+$ ]]But, you must sort your file list, because if you rename file_1 to file_2 before...
3,352
Posted By disedorgue
Hi, why do you not use option -r of the command...
Hi,
why do you not use option -r of the command lsblk like this ? :
lsblk -ro NAME | grep -A1 -w "$DISK" |grep -v "$DISK"Regards.
3,659
Posted By disedorgue
Hi, For fun, another bash script: while...
Hi,
For fun, another bash script:
while IFS=\| read -a ARR
do
[[ ${#ARR[10]} -gt 4 ]] && {
XX="${ARR[10]::((${#ARR[10]}-4))}"
YY="${ARR[10]:((${#ARR[10]}-4)):4}"
...
3,398
Posted By disedorgue
Hi, Just an example with command linux date: ...
Hi,
Just an example with command linux date:
$ for i in 1 2 3 4 5 60 3600 86400
> do
> date --date "2014-05-14T00:00:00 $i seconds" "+%Y-%m-%dT%H:%M:%S"
> done
2014-05-14T00:00:01...
Forum: Programming 07-23-2018
2,565
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).
2,105
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...
Forum: Solaris 07-09-2018
4,761
Posted By disedorgue
Hi, what give: ulimit -a | grep file And...
Hi,
what give:
ulimit -a | grep file
And your mount option for your partition (largefiles is enable) ?

Regards.
2,617
Posted By disedorgue
Hi, Maybe like as: $ cat /tmp/a.csv ...
Hi,
Maybe like as:
$ cat /tmp/a.csv
8121E002-96FE-4C9C-BC5A-6AFF20DACECD
84468F30-F3B7-418B-81F0-0908E80792BF
$ cat /tmp/b.csv
"test-data","TEST/DATA/84468F30-F3B7-418B-81F0-0908E80792BF.pdf"...
6,105
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; ...
Showing results 1 to 25 of 495

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