Reputation
18,335
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
10 61 100
Impact
~1.4m people reached

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?
Dec
9
answered determining path to sourced shell script
Dec
9
answered Is PAE worth it when I have 4GB RAM?
Dec
8
answered Bash script and Database
Dec
8
revised What is the difference between ls and l?
added 5 characters in body
Dec
7
answered How can I chase a program who is rising up my laptop's temperature?