Reputation
Next tag badge:
1008/1000 score
194/200 answers
Badges
21 207 385
Impact
~7.2m people reached

Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
Works without path so avoid hardcoding the path of `zsh` which may not be in /bin
Oct
5
comment How do you manage your bash/zsh Aliases?
yash is at yash.osdn.jp/index.html.en
Oct
5
comment How do you manage your bash/zsh Aliases?
POSIXly, you could use xargs to process the output of dash's alias, but not that of ksh93 which uses the $'...' form of quoting in some cases.
Oct
5
comment How do you manage your bash/zsh Aliases?
In zsh, you use alias -L. The POSIX output of alias is parsable, but not POSIXly. For instance in bash or zsh. eval "a=($(alias))" would work. Also note that zsh has the different types of alias definitions in associative arrays ($aliases, $galiases...).
Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
added 97 characters in body
Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
added 97 characters in body
Oct
5
comment Use shell's “*” glob, but exclude one file and don't match directories?
@jww, here you do want to force the shell to be zsh, so SHELL ?= /bin/zsh would not make sense. Note that make's $SHELL is never inherited from the environment's $SHELL. Those two variables have different meanings (one for the shell used to interpret shell command lines in make (sh by default), the other one for the user's preferred choice of interactive shell (for things like xterm or vi...)).
Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
added 49 characters in body
Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
added 87 characters in body
Oct
5
revised Use shell's “*” glob, but exclude one file and don't match directories?
added 87 characters in body
Oct
5
answered Use shell's “*” glob, but exclude one file and don't match directories?
Oct
5
comment How do you manage your bash/zsh Aliases?
AFAICS, there's no mention of alias -p in the POSIX specification for alias, and in practice is only supported in ksh, bash and yash. The question is about bash (where alias works the same as alias -p except in sh emulation, and it's true that in that case alias -p would be needed) and zsh (where -p is not a supported option).
Oct
2
comment Is there a faster way to remove a line (given a line number) from a file?
There's little benefit for a Linux+other free software distribution vendor to get certified and anyway it would be hard to achieve because the software is developed by 3rd parties anyway. But there's a lot of benefit in being POSIX conformant (or at least to agree on one standard, and the opensource community has so far failed to come up with a compelling alternative to POSIX), to ease interoperability and you see most core software maintainers aiming at that. For echo (a lost cause), blaming bash is wrong since bash is conformant when in the right environment (and is certified via OS/X)
Oct
2
comment awk - how to ignore wildcard matches?
Note that $3 == "0" will only match for 0, use $3 == 0 to also match on 00 or 0.0 or 0e2, or (depending on the awk implementation) 0x0. Use !$3 for the same as $3 == 0 and the empty string. In anycase, none will match on "0" (0 surrounded by quotes).
Oct
2
comment Is there a faster way to remove a line (given a line number) from a file?
most Linux/GNU-based Unix-like software distributions only seek (without committing to) POSIX conformance, and only follow XSI unless that would break backward compatibility (like would be for echo). Same of FreeBSD. Between themselves, that probably constitutes over 90% of the audience of this Q&A site, so they can't be ignored. Best it to give up altogether on echo. That command is beyond hope to be made portable.
Oct
2
comment Is there a faster way to remove a line (given a line number) from a file?
The behaviour of echo '\0013\0003!' is unspecified by POSIX. Posixly, you'd write printf '\13\3!\n'.
Oct
2
comment Working around a buggy keyboard / hacking an input stream?
Can you post the output of xev when that happens? Does it also happen at the linux virtual console? It sounds more like a VirtualBox issue (which provides with the virtual keyboard) than a hardware issue. Do you have the problem with other Windows applications as well?
Oct
2
revised Why am I unable to attach `strace` to a kworker process?
edited title
Oct
2
comment How can I find all files that do NOT contain a text string?
There's a difference with GNU's grep -L though in that it will also include the non-readable files in the list.
Oct
2
comment How can I find all files that do NOT contain a text string?
That one has the benefit of being standard and portable.