scripting question
jeffrey_n_Dyke at Keane.com
jeffrey_n_Dyke at Keane.com
Thu Apr 29 17:48:36 UTC 2004
Ajai Khattri <ajai at bway.net> wrote:On Thu, 29 Apr 2004
jeffrey_n_Dyke at Keane.com wrote:
> 2. is there a way to run exec without it exiting the current shell
after
> the command ends?
exec replaces the current process with the one you are execing (so
the
shell is gone). If you want to return to the shell after running a
command
then do not use exec.
--
Aj.
Sys. Admin / Developer
AJ is correct. However, depends on what you want to do. In ksh for
instance; exec < text_file will open a file descriptor for reading
(text_file) and will not "replace" the parent shell.
--
___________________________
Thanks for the comments. I realize that AJ is indeed correct, and exec is
supposed to work that way, Which is why i asked if there was a way around
it. Assuming no...So, let me get back to the first part of my question. Is
there a way to execute a command in a loop via graves (or any other method)
and NOT loose the newline characters.
The command i'm running in a loop is lsvg -p $volume_group_name. i'm
building that line based on an lsvg of all the volume groups.
Thanks again.
Jeff
___________________________
Nix
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list at redhat.com
https://www.redhat.com/mailman/listinfo/redhat-install-list
To Unsubscribe Go To ABOVE URL or send a message to:
redhat-install-list-request at redhat.com
Subject: unsubscribe
_______________________________________________
Redhat-install-list mailing list
Redhat-install-list at redhat.com
https://www.redhat.com/mailman/listinfo/redhat-install-list
To Unsubscribe Go To ABOVE URL or send a message to:
redhat-install-list-request at redhat.com
Subject: unsubscribe
More information about the Redhat-install-list
mailing list