14,972 reputation
12052
bio website shelfari.com/joseph-riad
location Cairo, Egypt
age 26
visits member for 1 year, 9 months
seen 1 hour ago
  • Electronic engineering major. (MSc. holder, PhD. candidate)
  • Doing Linux sysadmin stuff for lack of someone better.
  • Lover of books: technical, non-technical, literary,...

Reach me at joseph dOT samy DoT albert At Google's email service

profile for Joseph R. on Stack Exchange, a network of free, community-driven Q&A sites


7h
awarded  Good Answer
Aug
13
comment How to find the PID of nginx process
+1 I prefer it, too. I guess you don't see it around much because it relies on having /proc, so it's less portable than a vanilla ps | grep.
Aug
13
comment want the last line when duplicate awk?
Please clarify why the last line is required. Is it because it's adjacent to a similar one? I'm not sure I follow your logic.
Aug
13
comment Why does the while cycle skips and only reads the first line?
Just a thought. Is it possible you have -e set and the script exits prematurely due to an error?
Aug
13
comment Why does the while cycle skips and only reads the first line?
How about:...echo "$ONELINE" | read SERVER RSATYPE IP USER PWD...? It doesn't solve your immediate problem, but it definitely makes for more readable code.
Aug
13
comment Why does the while cycle skips and only reads the first line?
You don't need to set the FS in awk anyway. It defaults to whitespace (that includes a space and a \t).
Aug
13
awarded  Good Answer
Aug
12
accepted List Kerberos principals with valid TGTs
Aug
11
comment calling uglifyjs (javascript function) from within a perl script
This question is probably better asked on Stack Overflow as it seems to have nothing to do with Unix and/or Linux.
Aug
11
answered How can I delete text before a delimiter in Linux
Aug
11
comment Kill a Process for a User
Move line 4 of the above code into the subroutine body and remove line 5 altogether, then add &kill_processes() after the statement that prints a lot of asterisks.
Aug
11
comment Kill a Process for a User
a) The read on <STDIN> to find out the user name is duplicated b) You're not even calling the kill_processes sub.
Aug
10
revised Insert Lines after Multi-Line Regex Match
added 56 characters in body
Aug
10
answered Insert Lines after Multi-Line Regex Match
Aug
10
answered Extract tomcat parameters from ps output
Aug
9
revised Creating symbolic links
added 4 characters in body
Aug
9
answered Creating symbolic links
Aug
9
comment Creating symbolic links
What OS and UI are you talking about? On all Linux distros I have dealt with, a softlink is shown as an icon in the directory where it's placed.
Aug
8
revised Manage only a section of a config file with Puppet (multiline file_line)
edited title
Aug
8
answered Manage only a section of a config file with Puppet (multiline file_line)