jw013

United States

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.

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
Apr
23
comment Are the to-hit chances skewed in Wesnoth single-player?
I am not a dev nor have I looked at the code, so I cannot answer this question with any authority but it is highly unlikely that anything like this is in there. Single player difficulty is tweaked with gold and turn limits, not cheating at dice. The human brain is notoriously bad at accurately estimating probabilities. Mathematically, if you have archers take 4 shots at 60% chance to hit, you are going to be rather disappointed roughly 1/5 (18%) of the time (i.e. they miss 3-4 shots), which may be more often than you would expect.
Apr
12
comment Lagging behind in levels, how do I catch up?
@Gabb If you can't find anything level appropriate to do just go backwards and find something level appropriate. Either you'll come across something you missed or you can just repeat a dungeon for some extra loot.
Apr
12
awarded Popular Question
Mar
31
comment How to know when a one-on-one is in your advantage in Heroes of the Storm?
At level 1 all you need to do is spend 5-10 seconds in the lane to get an idea of how the match-up is going to go. There's too many hero and talent combinations to answer this properly.
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
1 2 3 4 5