Reputation
2,699
Top tag
Next privilege 3,000 Rep.
Cast close and reopen votes
Badges
4 18
Newest
 Student
Impact
~134k people reached

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
12
reviewed Approve What happens if i don't purchase license for RHEL?
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
Apr
9
reviewed Approve RHEL 6.6: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 403 Forbidden”
Apr
8
reviewed Approve Systemd dependency tree saving
Apr
8
revised Script tries to create files even though it shouldn't have to?
Adding mkdir to demonstrate the unnecessity of th if...fi condition block
Apr
7
comment Script tries to create files even though it shouldn't have to?
THe simpel answer is mkdir -p "$dir/0folder" It will create if it doesn't exist otherwise nothing happens.
Apr
5
comment create an array
Remove $ from names. Not $names but names
Apr
5
reviewed Approve tiff2pdf coloured
Apr
3
reviewed Approve Get list of subdirectories which contain a file matching a string
Apr
3
reviewed Approve Can overwritten files be recovered?