Re: [opensuse] different types of shell scripts
- From: jdd <jdd@xxxxxxxxx>
- Date: Thu, 22 Sep 2011 10:39:28 +0200
Le 22/09/2011 10:11, George OLson a écrit :
So my question is, what is the difference between running a script
file with the command
<dot><space><filename>, for example "#> . myscript.sh"
.........................
"help ."
.: . filename [arguments]
Execute commands from a file in the current shell.
Read and execute commands from FILENAME in the current shell. The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.
so . filename runs the script listed in the file filename
..........................
usually, "." is the current folder, so ./script runs the script in the current folder, just in case you have a widely executable of the same name
for example, test is a shel command, so:
dd@linux-0i5h:~> test
jdd@linux-0i5h:~> ./test
bash: ./test: Aucun fichier ou dossier de ce type
with ./test I could run my own script named test (just a example, it's not a good idea to have several commands with different result)
jdd
--
http://www.dodin.net
http://pizzanetti.fr
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] different types of shell scripts
- From: Anton Aylward
- Re: [opensuse] different types of shell scripts
- From: jdd
- Re: [opensuse] different types of shell scripts
- References:
- [opensuse] different types of shell scripts
- From: George OLson
- [opensuse] different types of shell scripts
- Prev by Date: Re: [opensuse] different types of shell scripts
- Next by Date: Re: [opensuse] different types of shell scripts
- Previous by thread: Re: [opensuse] different types of shell scripts
- Next by thread: Re: [opensuse] different types of shell scripts
- Index(es):
Relevant Pages
|