89,605 reputation
12103217
bio website
location European Union
age
visits member for 2 years, 2 months
seen 2 hours ago

Aug
22
comment efficient cross-os file size shell function
wc generally does a stat (and a lseek to leave the cursor at the end) for regular files. The only notable exception I'm aware of is busybox wc and old implementations on some systems (can't remember which now).
Aug
22
revised Display ZSH brace expansion
added 54 characters in body
Aug
22
answered Display ZSH brace expansion
Aug
22
revised Display ZSH brace expansion
deleted 11 characters in body
Aug
22
revised Create a test file with lots of zero bytes
add `pv`, typo
Aug
22
comment grep command. '^1' won't work
@Gnouc, also \v and plenty of others in UTF-8 locales (on GNU systems at least), though you probably don't care if those characters are not in the file anyway. It's basically the same as [[:space:]]. If you want only space and tab, use LC_ALL=C grep '^[[:blank:]]*1'. Or awk '$1 ~ /^1/'
Aug
22
revised How can I check GMail messages with prompt for password from a script?
deleted 9 characters in body
Aug
22
answered How can I check GMail messages with prompt for password from a script?
Aug
22
revised Calling a function which calls another function with a for loop
deleted 14 characters in body
Aug
22
comment Add text to end of every line
-i '' is for in-place editing. txt.txt has been modified. sed has produced no output.
Aug
22
comment Cannot access elements of an array in zsh
@Vesnog, put #! /bin/zsh instead of #! /bin/bash at the top of your script.
Aug
22
comment Cannot access elements of an array in zsh
@Vesnog, your script has to be a zsh script, not a bash script.
Aug
22
revised Cannot access elements of an array in zsh
added 371 characters in body
Aug
22
answered Cannot access elements of an array in zsh
Aug
22
comment how to pass a value to a variable that in a other variable
if you want to write without arrays because you want it to be portable to other shells that don't have arrays, then you can't use ${!var} either which is even less portable. You'll have to resort to eval. If Michael's answer answers your needs, you should accept it (tick next to it).
Aug
22
revised How can I pass a filename containing percent signs (%) as a parameter to a shell script in cron?
formatting, reference to doc
Aug
22
revised How can I pass a filename containing percent signs (%) as a parameter to a shell script in cron?
deleted 40 characters in body; edited tags
Aug
22
awarded  Nice Answer
Aug
22
revised Why does “wc -c” print a value of one more with echo?
add reference to documentation (Unix spec) for the standard SysV/Unix form.
Aug
22
revised Linux: set date through command line
typos, clarify that we're talking of GNU date here.