Prev | Current Page 342 | Next

Michael McCallister

"openSUSE Linux Unleashed"


NOTE
openSUSE Linux automatically creates a /bin subdirectory in your home directory. This
is a good place to store your scripts because this is the first item in your search path.
If you place the shell script file in a directory that is not listed in the PATH, you must
manually specify where it is located in the shell command. This can be done using either
a full pathname or shortcuts. Using the full pathname looks like this:
rich@testing:~> /home/rich/scripts/test1
If you want to run a script that is in the current directory, you can use the shortcut:
rich@testing:~/scripts> ./test1
Mon Dec 11 18:21:15 EST 2006
rich :0 2006-12-11 15:23 (console)
rich pts/1 2006-12-11 15:24
rich pts/0 2006-12-11 16:42
barbara pts/2 2006-12-11 17:30
katie pts/3 2006-12-11 17:39
rich@testing:~/scripts>
Using the Shell in openSUSE 145
8
Look familiar? It is the same output that was produced by entering the two commands
directly on the command line. Now any time we run the test1 script, we can get the
results without having to manually enter both commands.


Pages:
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
news news news nowoĊ›ci designerskie news