Reputation
21,920
Next tag badge:
856/400 score
77/80 answers
Badges
3 49 79
Newest
 Good Answer
Impact
~879k people reached

May
19
answered Help with String manipulation in shell
May
19
comment How to escape correctly this word on vim?
To figure out what should or should not be escaped, read the vim documentation on the magic option: :help 'magic'.
May
15
comment How to properly use awk in ksh?
What you have here is a frankenscript with awk and shell parts mashed together. You need awk to run awk scripts. ksh doesn't understand awk scripts and isn't smart enough to run awk unless you tell it to. Also you missed a " after STOP in your script.
May
15
comment Script to read line by line from a file pipe that to another command and output to another file
You have a space between $ and line. If that typo is in your script as well all you are doing is hashing the text $ line over and over.
May
13
comment How can I list every port serving a web page
@John I am aware of nmap's default behavior which is why I commented about the -sV option that causes nmap to switch from its default database of "well known" port numbers to a more intrusive identification algorithm, where it will actually send GET requests to the port in question. I just tested it on my machine and it was able to successfully identify a http service on port 23. Without -sV it went back to labelling it as telnet.
May
13
comment How can I list every port serving a web page
One could also try nmapping the server with the service detection option enabled (-sV) and then inspecting / parsing the output for http. I don't know how robust or accurate nmap's service detection algorithms are but nmap itself is well-regarded.
May
13
comment compare two files and fetch data
First, the file order should be FileB FileA according to your script, right? Second, I think the desired fields are 10 and 11 not 7 and 8. Perhaps OP could clarify whether or not $12 should be included as well.
May
13
comment compare two files and fetch data
Please add to your question the desired output for the two example files you have above, so we know what format you want the output to look like. Do you want a separate file for each "id"?
May
13
revised compare two files and fetch data
minor clean up
May
11
awarded  Good Answer
May
7
revised Vim replace in a visual mode
added 159 characters in body
May
7
answered Vim replace in a visual mode
Mar
30
awarded  Enlightened
Mar
30
awarded  Nice Answer
Mar
17
awarded  Guru
Feb
24
comment How do you derive a decimal from a math operation involving a variable?
bash only does integer math. Just use awk and be done in one line: awk '{sum += $4} END {print 10^5/sum}' $f
Feb
24
comment Ubuntu installaion doesn't ask for boot loader
What version of Ubuntu and which install method / image did you use? What options did you choose during the install? If the system installed and boots successfully it's not really a problem, is it?
Feb
24
comment the timezone format in /etc/timezone of debian7
UTC is not a location, so it is a special case and goes into Etc.
Feb
21
answered What is the meaning of the number displayed by echo $$ ?
Feb
20
answered Split of path in an order