Reputation
1,841
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 15
Newest
 Nice Answer
Impact
~29k people reached

Jun
19
awarded  Nice Answer
Jun
19
comment How to edit shell prompt to show time?
setenv is a csh command. You should get a "command not found" error in zsh.
Jun
19
awarded  Explainer
Jun
19
revised What does “if $” mean in if $( ssh user@host “ [ -e file ] ” ); then …?
deleted 5 characters in body
Jun
19
answered What does “if $” mean in if $( ssh user@host “ [ -e file ] ” ); then …?
Jun
19
revised What does “if $” mean in if $( ssh user@host “ [ -e file ] ” ); then …?
Improve formatting of indented code.
Jun
19
suggested approved edit on What does “if $” mean in if $( ssh user@host “ [ -e file ] ” ); then …?
May
23
comment Extract two values from the output of a command
Don't use a separate grep command when you can add the filter to awk: awk '/SSID:|signal/ {printf ...}'
May
23
comment Split shell horizontally to show ls -al and pwd
Shell is a line-based program; it reads from a stream and writes a stream of output. It has no notion of a screen as something with addressable locations to place output.
May
23
comment Which one works faster - regular operators (such as <,>,=) or using (-lt, -gt, -eq)? and why?
Compare [ 1 = 01 ] and [ 1 -eq 01], and ask yourself if a negligible difference in speed would matter. Use the string operators for strings, the integer operators for integers, and don't worry about something that will never be a bottleneck in shell script. If comparisons constitute any significant portion of your script's total running time, you are using the wrong language.
May
3
suggested rejected edit on After each reboot, speakers have volume 0
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.