Reputation
7,012
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
13 27
Newest
 Enlightened
Impact
~749k people reached

  • 0 posts edited
  • 1 helpful flag
  • 478 votes cast
Nov
8
comment Return only the portion of a line after a matching pattern
similar to unix.stackexchange.com/questions/24089/… as well.
Nov
7
answered How to configure Linux to use DHCP or static IP depending on presence/absence of DHCP server?
Nov
7
comment crontab “0/15” minutes + “11-15” hour field: when does that end?
ah. that extra field makes all the difference. your application would then run, every 15 minutes, on the zero second, from 11:00 to 15:45, every mon-friday.
Nov
7
answered crontab “0/15” minutes + “11-15” hour field: when does that end?
Nov
7
comment Returning only the portion of a line after a matching pattern
I have updated my example to specifically include the space after the colon following Result: . This will now ignore lines like that in your example, and more closely match the initial request of the OP.
Nov
7
revised Returning only the portion of a line after a matching pattern
updated to include a space after the :.
Nov
7
revised Writing a shell script to take output of an executable and perform some calculation
added 361 characters in body
Nov
7
answered Writing a shell script to take output of an executable and perform some calculation
Nov
7
comment Returning only the portion of a line after a matching pattern
the OP doesn't mention a second colon. Just that the string ocurring between Result: and the next space are what is desired. Awk will by default break up the line on white space. $1 = "Result:", $2 = the next word. Which is what the OP requested to extract.
Nov
7
answered Find out if a session is running under `su`
Nov
7
answered Returning only the portion of a line after a matching pattern
Nov
4
comment How do I exit a script in a conditional statement?
@GarrettHall this is identical to the one liner that is in the previous answer. The only different between a one-liner, and a multi-line answer, is formatting.
Nov
4
comment How do I exit a script in a conditional statement?
your logic is backwards. in your example, if id -u == 0, which would mean that you are root. You want [[ $(id -u) != 0 ]]; then.
Nov
4
comment Making a simple PHP script process text in a pipe
thanks @janmoesen, for the PHP and STDIN tip.
Nov
3
answered How to configure a Frame Relay in Unix/Linux?
Nov
2
answered How do I track all the most recent file changes on my UNIX system?
Nov
2
comment Making a simple PHP script process text in a pipe
i'm glad to hear that.
Nov
2
answered Making a simple PHP script process text in a pipe
Nov
1
answered Changing terminal emulators
Oct
31
answered how to disallow user to change process group