Reputation
Next tag badge:
1001/1000 score
194/200 answers
Badges
21 202 381
Newest
 Good Answer
Impact
~7.2m people reached

Jan
11
comment How to loop on my files to find a file that have an exact expression at the beginning of a line?
@mohammad.k, see for instance What is the difference between "du -sh *" and "du -sh ./*"?
Jan
11
answered How to loop on my files to find a file that have an exact expression at the beginning of a line?
Jan
11
comment Duplicate file, replace character, then concatenate
Yes, looks like it's 8k indeed so it's even less than 10 full lines (at least 20480 per POSIX). Not sure where I got the 10 lines from (10240 was also the number I had in mind, and I thought the minimum LINE_MAX was 1024). Memory's getting really bad...
Jan
11
revised Duplicate file, replace character, then concatenate
deleted 1 character in body
Jan
11
comment Duplicate file, replace character, then concatenate
Unix in itself doesn't mean anything. What Unix is it? HP/UX, Solaris, AIX?
Jan
11
comment Duplicate file, replace character, then concatenate
The /dev/fd/0 approach will only work on Linux. On other systems, opening /dev/fd/0 is more like a dup(0).
Jan
11
comment Duplicate file, replace character, then concatenate
Note that many non-GNU sed implementations have a very limited size for their pattern (and hold) space (POSIX only guarantees 10 full lines IIRC)
Jan
10
awarded  Guru
Jan
10
revised Does 'rm .*' ever delete the parent directory?
. and .. excluded from globs in the Forsyth shell before zsh.
Jan
10
comment How to treat numbers starting with zeroes as decimal integer
ksh and zsh also have typeset -Z6 i.
Jan
10
comment How to treat numbers starting with zeroes as decimal integer
comm -13 <(ls) <(seq -f 'A-B-%06g-C' 999999) to find the missing ones. See also Why is using a shell loop to process text considered bad practice?
Jan
8
answered Duplicate file, replace character, then concatenate
Jan
8
revised Concatenating two variables with an underscore
added 109 characters in body
Jan
8
revised Concatenating two variables with an underscore
added 83 characters in body
Jan
8
answered Concatenating two variables with an underscore
Jan
8
answered Move lines 2 3 after line 5 using awk
Jan
7
comment Replace current process by its coprocess/child
cat generally doesn't buffer. If it does on your system, try cat -u.
Jan
7
comment sorting using the -k command
Or just sort -t / -k 2 or sort -k 3.7
Jan
7
comment How can I kill my backticked yes process?
It was even already dead upon ^C.
Jan
7
comment `Syntax error: “(” unexpected` when creating an array
The sh language has no arrays (a[index]=x or a=(x y)). Some sh interpreters support arrays, only ksh88 (not ported to Linux AFAIK) and some older pdksh variants would support a[index]=value and not a=(x y). On Debian, sh is usually dash which has no array support (a[index]=x won't work).