Reputation
17,750
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
9 61 98
Newest
 Good Answer
Impact
~1.3m people reached

Dec
16
revised $VAR vs ${VAR} and to quote or not to quote
missed a step in example
Dec
16
comment $VAR vs ${VAR} and to quote or not to quote
@alex: Thanks. I thought I had tested that on the command line, but I did it wrong. I changed the example.
Dec
16
revised $VAR vs ${VAR} and to quote or not to quote
fix another spelling fle1=>file1
Dec
16
revised $VAR vs ${VAR} and to quote or not to quote
Added more information after question modification
Dec
16
answered $VAR vs ${VAR} and to quote or not to quote
Dec
16
answered Block motion for any bracket type?
Dec
15
comment Is it possible to have vim key bindings in terminal?
Checkout the bind builtin
Dec
15
revised Is it possible to have vim key bindings in terminal?
Add information about modes.
Dec
15
revised Is it possible to have vim key bindings in terminal?
Add information about readline
Dec
15
answered Is it possible to have vim key bindings in terminal?
Dec
15
answered find-command for certain subdirectories
Dec
15
comment Make find show slash after directories?
I continue to be amazed at the flexibility of find.
Dec
15
answered Make find show slash after directories?
Dec
15
answered Which run dialog
Dec
14
comment Adding numbers from the result of a grep
The problem there is your expression. with `totalErrors=${errors}+${totalErrors}, you're creating a string. You can do the same trick: echo both numbers as a list and use awk to sum them, or you can do it the bash way.
Dec
14
comment Adding numbers from the result of a grep
@Amir Afghani Also, you might want to change your grep to "[0-9]\+ errors". This will match if you have a line reporting >9 errors.
Dec
14
comment Adding numbers from the result of a grep
@Amir You would use the first one like this variable=$(grep -o "[0-9] errors" verification_report_3.txt | awk '{ SUM += $1} END { print SUM }') This puts the output of the command (which is only the sum value) into the variable called variable
Dec
14
answered Adding numbers from the result of a grep
Dec
14
comment Redirecting stdout to a file you don't have write permission on
Tee will also output to stdout; sometimes you don't want the contents filling the screen. To fix this, do echo test | sudo tee /tmp/foo > /dev/null
Dec
14
awarded  Enthusiast