I have a doubt about the execution pattern of a unix script.
For example a script containing lines:
command B
function C()
{
Myscript // Myscript is a script
command D
}
command E
and suppose if Myscript takes a long time to execute (say 5 minutes) then is the next command (command D) going to execute or wait for Myscript to complete.
I apologize if this is an overly-long question, but this is detailed, complex stuff I'm wading in:This is from Chapter 1 of the GNU/Linux tutorials:1.5.3. "$PATH" variableWhen you type a command into the shell, the shell searches the command in the list of directories contained in the "$PATH" environment variable.
I used the command:
PATH=$PATH:/opt/lum/ls/os/linux/bin/;export PATH
in terminal to add that path to the path command, but every time I leave the terminal window and check it again with
echo $PATH
It is no longer in there.
Hi,
I'm trying to use the below command in a shell script, but couldn't.
The command is working fine when I'm executing from the dollar prompt i.e.
how can i get the absolute path of whatever directory a script and/or command is in when it is run?
i want to know the directory. say for instance, if i were to run the "who" command, i want to know exaclty where the who command is located.
if a user ran a script, i want to know where there script is located.
can this be done in a script?
shell: bash
os: linux / sunos
Hi all.
I have a problem
My server is HP, and installed Sun OS 5.10 generic i86pc
I have misstake with command "crle -l /opt/nms/lib", so default library path "/lib:/usr/libs" lose.
Now, I can't restart system, message is: "Warning:init(1m) existed on fatal signal 9".
So, i boot into failsafe mode to create /var/ld/ld.config file.
i have been playing around with shell scripting, nothing too complex just learning the basics. if i try to run a script as root (by entering "sudo" then the "command") it says command not found. i can only do it ass root if i specify the full path (/home/username/bin/command) im pretty sure the directory that my scripts are in are part of the superusers path.
Hello All,
Bash Version: 4.1.10(1)
I'm trying to "verify" some user input.
Hello All,
I have a bash script and in it at some point I call an Expect Script that does some stuff and saves its
output in a ".txt" file.
Example "/path/to/my/file/Expect_Output.txt" file: notice the 2nd line is empty in the file...
Code:
Data for Host-1 (192.168.1.110)
Checking the status...
Status is GOOD
Then later on in my Bash script, I run the following command