Reputation
1,700
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 13
Newest
 bash
Impact
~24k people reached

Apr
24
awarded  bash
Apr
14
comment Passing a bash command line arguments containing #
Also, in an interactive shell, the # is only a comment if the interactive_comments option is set
Jan
26
awarded  Nice Answer
Dec
12
answered How do I handle special characters like a bracket in a bash script?
Nov
19
comment Is there a way using a bash script to get the location of changes made in last git commit?
What about simply using HEAD in place of $LASTCOMMIT?
Nov
19
comment Bash extended globbing
+1 An example of the proper use of @ would be @(foo|bar).txt to match foo.txt or bar.txt but not any other file.
Nov
19
comment Store stdout in variable and send command to background
The text prior to the code mentions that it is up to the user to replace [...] with something that determines when it is safe to read from file, whether it be calling wait to block until the process exits, or waiting until file has some minimum length, or something else.
Nov
18
comment syntax error near unexpected token `<'
You mean process substitution (<( echo foo )), not command substitution ($(echo foo)) (which is part of the POSIX specification).
Nov
16
comment Change case of n-th letter in a string
The bash can be shortened with foo=${str:2} and ${foo^}, which only capitalizes the first character in the string.
Nov
16
comment Is test or [ or [[ more portable both between bash shells and between other shells?
Just to note, bash and zsh have supported [[ for a very long time (bash added it in the late 90s, zsh no later than 2000, and I'd be surprised if it ever lacked support), so you are unlikely to encounter a version of either without [[. Encountering a different POSIX-compliant shell (such as dash) is far more likely.
Nov
11
answered Is there a special variable containing a case statement match
Nov
6
answered cat STDIN won't work twice in script
Nov
6
comment cat STDIN won't work twice in script
<&0 only duplicates (redundantly and idempotently) the file descriptor, not the data available on that descriptor.
Nov
3
comment splitting a CSV and keeping the header without intermediate files
$(ls *.csv) is redundant; just use for csv in *.csv.
Nov
3
comment Change prompt when starting a terminal from bash script (but don't affect all terminals)
+1 for the PROMPT_THEME suggestion.
Nov
2
answered how to use regex in alias?
Nov
2
answered how to use regex in alias?
Nov
2
answered Tmux Keyboard Shortcut
Nov
2
answered bison says invalid option --
Nov
1
comment bash if statement troubles [Error==Error]: not found
= is not a bash operator here; it is an argument to [.