Reputation
2,942
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
4 19
Newest
 Nice Answer
Impact
~153k people reached

Apr
15
reviewed Approve Run a command a as a certain user and multiple groups with sudo
Apr
14
reviewed Approve Using the grep filter
Apr
14
awarded  Student
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
wow I didn't know about the -S option. This gives some more insights about the initsystem. Thanks a bunch!
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
@YoMismo dpkg -l shows that systemd is indeed installed but it seems not to be using it. For what I can see here: dpaste.de/KiuD
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
that makes sense. I'm aware that there is no 100% guarantee without checking everything carefully. Thanks again for your time and effort!
Apr
14
awarded  Scholar
Apr
14
accepted How to find out if a system uses SysV, Upstart or Systemd initsystem
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
Alright. I think the answer is acceptable considering the undefined nature of the initsystem. Checking the existence of /usr/share/upstart, /sr/lib/systemd and /etc/init.d/ could help me to write an automated script which somehow will determine the initsystem. Thanks you!
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
@WarrenYoung since I work on different platforms, I want to be able to see instantly what initsystem is running on what platform so I can focus on organizing startup scripts, creating and modifying new ones and so on. Eventually I want to modify the motd(Message of the Day) which tells me what initsystem runs once I log in on a system.
Apr
14
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
@YoMismo I'm not sure how I would use dpkg -l or yum to identify the initsystem. On Fedora for example: ps -p 1 -o command shows /usr/lib/systemd/systemd --switched-root --system --deserialize 20 On Debian wheezy the same command produces init [2]
Apr
14
asked How to find out if a system uses SysV, Upstart or Systemd initsystem
Apr
13
reviewed Approve executing command as su
Apr
12
comment How can I make xargs play nice with stdin?
I'm not sure why you wouldn't be able to? That just combines both functions. You are using one function to filter out comments and empty lines. After that you are reading the file and putting all lines in one.
Apr
12
comment How can I make xargs play nice with stdin?
The function you have there nocomment and oneline could be combined into one function nocomment_oneline and put sed '/^#/d;/^.$/d' "$1" | sed -e :a -e '$!N;s/\n/ /;ta'
Apr
12
comment How can I make xargs play nice with stdin?
Often is xargs not the command you need. You are using two external commands seq respectively xargs to achieve something that your shell can do it on it's own. Take for example Brace expansion in bash. You could then issue printf '%s\n' {1..10} to get the desired result
Apr
11
comment matching and merging lines with awk & printing with Solaris
@terdon a great perl one!
Apr
11
comment matching and merging lines with awk & printing with Solaris
@Karn Well many answers here are correct. I think you just need to get your head around and see if you understand it. All answers are explained to a great extent imo.
Apr
11
revised matching and merging lines with awk & printing with Solaris
added 43 characters in body
Apr
11
answered matching and merging lines with awk & printing with Solaris