Reputation
18,570
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
10 65 100
Newest
 Yearling
Impact
~1.5m people reached

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
Dec
11
awarded  Quorum
Dec
10
comment Rsync two file types in one command?
This is a general technique that you can use with any command. The shell will repeat the argument, replacing the brace expression with each item in the list. It's called brace expantion
Dec
10
comment Query DHCP server leases from Perl script
This question is probably better on ServerFault since the question is mostly about how to extract the lease information from Windows. It has much less to do with the fact that you want to do it in Perl on a Linux box. In fact, I'd bet you need at least some code on the Windows box to do the extracting.
Dec
10
answered How to strip a Linux system?
Dec
9
revised determining path to sourced shell script
add dash responses
Dec
9
revised how do you sort du output by size?
Note about version.
Dec
9
answered how do you sort du output by size?
Dec
9
answered bind the MAC with IP address?
Dec
9
revised how do you sort du output by size?
Better solution
Dec
9
answered how do you sort du output by size?