LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-07-2013, 05:01 AM   #1
Phorize
Member
 
Registered: Sep 2005
Location: UK
Distribution: Slackware
Posts: 223

Rep: Reputation: 27
Direct output of mkinitrd command generator to shell


Hi All,

Is there a way of directing/piping the output of mkinitrd_command_generator.sh directly to the shell so that I don't need to type out the resultant command?
 
Old 11-07-2013, 05:17 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,785

Rep: Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133
Just pipe it to bash
 
Old 11-07-2013, 05:17 AM   #3
bormant
Member
 
Registered: Jan 2008
Posts: 238

Rep: Reputation: 117Reputation: 117
Use pipe to bash:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh parameters_if_needed | bash
 
Old 11-07-2013, 05:50 AM   #4
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
Or put the command inside "$( )" like so:
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
 
Old 11-07-2013, 05:59 AM   #5
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: MLED, MLES, CentOS
Posts: 3,188

Rep: Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797
I always open /etc/mkinitrd.conf with Vim, paste the output of mkinitrd_command_generator.sh into the configuration file (:r !/usr/share/mkinitrd/mkinitrd_command_generator.sh) and then edit it.
 
Old 11-07-2013, 07:09 AM   #6
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,433

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
Highlight the output with the left mouse button held down, then paste with the middle button. Maybe uncool and uncouth, but works for me.
 
1 members found this post helpful.
Old 11-07-2013, 07:14 AM   #7
01micko
Member
 
Registered: Mar 2009
Location: Gold Coast, Queensland, Australia
Distribution: Puppy, Slackware
Posts: 83

Rep: Reputation: 7
Quote:
Originally Posted by allend View Post
Highlight the output with the left mouse button held down, then paste with the middle button. Maybe uncool and uncouth, but works for me.
+1 (must be an Australian thing )
 
Old 11-07-2013, 04:27 PM   #8
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 290

Rep: Reputation: 52
Quote:
Originally Posted by 01micko View Post
+1 (must be an Australian thing )
long live the lazy!! (ie, I do exactly the same)
 
Old 11-07-2013, 04:39 PM   #9
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,364

Rep: Reputation: 252Reputation: 252Reputation: 252
Quote:
Originally Posted by allend View Post
Highlight the output with the left mouse button held down, then paste with the middle button. Maybe uncool and uncouth, but works for me.
+2, 60% of the time, it works Everytime!
 
Old 11-07-2013, 10:26 PM   #10
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

Rep: Reputation: 68
# $(/usr/share/mkinitrd/mkinitrd_command_generator.sh) FTW
 
Old 11-08-2013, 06:34 AM   #11
ellington
LQ Newbie
 
Registered: May 2012
Location: Brazil
Distribution: Slackware Linux
Posts: 6

Rep: Reputation: Disabled
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -c > /etc/mkinitrd.conf
# mkinitrd -F

So you can keep track of your configs.
 
1 members found this post helpful.
Old 11-08-2013, 08:19 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
Highlight the output with the left mouse button held down, then paste with the middle button. Maybe uncool and uncouth, but works for me.
Same here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using shell command output as input in shell script - how to do? EnderX Linux - Newbie 2 06-30-2010 01:46 PM
[SOLVED] initrd and generic kernel fails to boot with errors after using mkinitrd generator adamschock Slackware 8 06-26-2010 03:30 PM
[SOLVED] How to direct standard output from find command dyq Programming 3 03-26-2010 04:55 PM
sudo mkinitrd -o /boot/initrd.img-2.6.32.9 2.6.32.9 sudo: mkinitrd: command not foun vishwas181 Linux - Newbie 1 02-27-2010 02:16 AM
shell command without output ricardo85xeii Programming 2 10-17-2007 12:58 PM


All times are GMT -5. The time now is 02:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration