368 reputation
112
bio website
location Hungary
age 15
visits member for 3 years, 9 months
seen Oct 6 at 20:37

StackFlair


Oct
6
comment Bash copy all files that don't match the given extensions
@mikeserv "And please don't link to that wooledge wiki thing - it is a terrible source of information - and not just on that page." - If there was a downvote button on comments, I'd surely downvote that. ls is definitely not meant to be parsed, and attempting to parse its output will break on obscure file names. Please don't make me reiterate. Unless you link to a reputable source claiming the opposite, I'm not going to believe you.
Sep
30
awarded  Explainer
Sep
20
revised Is it correct to use certain special characters when naming filenames in Linux?
deleted 2 characters in body
Sep
19
revised Is it correct to use certain special characters when naming filenames in Linux?
deleted 4 characters in body
Sep
16
awarded  Nice Answer
Sep
16
awarded  Yearling
Sep
16
answered Is it correct to use certain special characters when naming filenames in Linux?
Aug
9
comment Why is the 'if [ $1=“1” ]' branch always selected even if $1 is not 1?
Correction: double quotes are only not needed on the left hand side! [[ $foo == $bar ]] will perform pattern matching, but [[ $foo == "$bar" ]] won't.
Aug
9
comment Why is the 'if [ $1=“1” ]' branch always selected even if $1 is not 1?
$(cmd) is command substitution, (mostly) the same as `cmd`. See mywiki.wooledge.org/CommandSubstitution and mywiki.wooledge.org/BashFAQ/082
Aug
8
comment Why is the 'if [ $1=“1” ]' branch always selected even if $1 is not 1?
+1 for lab, Sun, Moon, Earth and teleport. But you should always double quote expansions ($var, $(cmd), and even `cmd` [to which $(cmd) should be preferred]). There are some edge cases where you don't have to quote, but always doing it won't hurt.
Aug
6
comment How to rename file to .. (dot dot)?
I think your space got lost.
Aug
3
awarded  Excavator
Aug
3
revised How to do integer & float calculations, in bash or other languages/frameworks?
add node.js
Aug
1
comment Multi-Threading/Forking in a bash script
Did you test that shebang line? Shebangs with multiple arguments are unportable. On Linux, #!a b c will result in ["b c"], while on some other systems, it will result in ["b", "c"].
Jul
28
comment What's wrong with this sed expression?
If everyone used PCRE (or a subset of it, such as POSIX ERE), the world would be a happier place.
Jul
28
revised What's wrong with this sed expression?
added 63 characters in body
Jul
28
comment What's wrong with this sed expression?
+1 for the ._. smiley.
Jul
28
answered What's wrong with this sed expression?
Jul
7
comment Redirecting output depending on grep regex
You should use read -r line and printf '%s\n' "$line" to avoid some edge cases breaking things.
Jul
4
comment Removing a directory that has no files in it
For the record, you can also use rmdir --ignore-fail-on-non-empty, but of course that's longer than rm -rf and no sane person would ever use it. ;)