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

12h
comment Use alias after issuing sudo su command
.profile is only read for login shells. You should define aliases in .bashrc not .profile.
1d
comment Specify String Lenth in Awk Pattern Search
It should, but why don't you just try it and see?
1d
comment Specify String Lenth in Awk Pattern Search
Is your awk implementation provided by mawk? It looks like mawk doesn't support the {m,n} syntax at all. Try using a more full featured implementation like GNU's gawk.
2d
comment Remote SSH into raspberry pi
The source net of 192.168.2.2 suggests you are only forwarding local connections. You probably want to set it to something more inclusive like 0.0.0.0 to forward incoming connections from all outside sources.
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