LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Direct output of mkinitrd command generator to shell (http://www.linuxquestions.org/questions/slackware-14/direct-output-of-mkinitrd-command-generator-to-shell-4175483707/)

Phorize 11-07-2013 04:01 AM

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?

Didier Spaier 11-07-2013 04:17 AM

Just pipe it to bash

bormant 11-07-2013 04:17 AM

Use pipe to bash:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh parameters_if_needed | bash

wadsworth 11-07-2013 04:50 AM

Or put the command inside "$( )" like so:
Code:

$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)

kikinovak 11-07-2013 04:59 AM

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.

allend 11-07-2013 06:09 AM

Highlight the output with the left mouse button held down, then paste with the middle button. Maybe uncool and uncouth, but works for me.

01micko 11-07-2013 06:14 AM

Quote:

Originally Posted by allend (Post 5059976)
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 :p)

perbh 11-07-2013 03:27 PM

Quote:

Originally Posted by 01micko (Post 5059983)
+1 (must be an Australian thing :p)

long live the lazy!! (ie, I do exactly the same)

Daedra 11-07-2013 03:39 PM

Quote:

Originally Posted by allend (Post 5059976)
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!

XGizzmo 11-07-2013 09:26 PM

# $(/usr/share/mkinitrd/mkinitrd_command_generator.sh) FTW

ellington 11-08-2013 05:34 AM

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -c > /etc/mkinitrd.conf
# mkinitrd -F

So you can keep track of your configs.

brianL 11-08-2013 07:19 AM

Quote:

Originally Posted by allend (Post 5059976)
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.


All times are GMT -5. The time now is 07:41 PM.