I think the answer might be execute permission. If a script has +x then you can execute just as you would execute a binary file. E.g.
My script has a execute permission and I ran it like any binary file, same goes for perl scripts. But you also have to define the program which will interpret your scripts in the very first line. For Perl, it's usually, #!/usr/bin/perl or where your perl is installed. Else I'd have to use:
HTH,
Nitin
you are correct, the #! line tell the shell what to run the "script" under.
I have a SQL script that requires values from the environment in order to execute. I found a way to get the desired results but my process is a little choppy. Any suggestions on how to clean this up would be greatly appreciated.
SQL Script
-------------
select a, b, c
from d
where a =... (1 Reply)
I have written a script to ftp a file from Unix to an NT machine to authenticate ftp login I have added the information into the .netrc file when logged in using ftp the commands are not executed. Does anybody know how to make the command execute once username and password have been provided using... (2 Replies)
Basically, I would like to run an mpirun query on my web server to query your databases via yours when using the BLAST program, however the server seems not able to execute even basic mpirun programs such as cpi (to calculate pi). Are there any settings I should take note of?
I am running Perl... (0 Replies)
Hi, guys !
I have at home a simple network. I have a server that shares the internet connection to my computer and another another computer which is located in another room. When I want to download something, I'd like to download directly on the server, without letting my computer on. The server... (2 Replies)
Hi,
I want to run these two commands one after the other.
awk 'BEGIN {OFS="\t"} {print $2}'
sort -u
rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3?
Its kinda hard for... (5 Replies)
Hi Friends,
I have a situation here, where I have a script running in one server, namely "SERVER1". Within this script which runs in SERVER1, I have a set of commands which has to connect to a different server (namely "SERVER2") and execute the commands accordingly. I have no experience at all... (1 Reply)
I need to execute a command to run my script several times with varying parameters
perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt
perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt
perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt
.
.
.
100's of excutions
... (2 Replies)
Hi,
I am stuck into a situation where i want to execute a command in my shell script well along with a previous command in order to achieve something but i am not figuring out a way.
here is a snippet:
service management restart
rm -rf lock.file
in the above, if you see, i am trying to... (5 Replies)
Hello.
I am new in shell script. Could anyone help me?
I have un shell script. I need each command in it be sequentielly, when the first command ends the second starts. When the second ends et third starts, and so on
Thanks in adavance (1 Reply)
If you want to capture the output of any command, we then will be writing the system command in `` or qx.
`` an qx works fine with all linux and windows system commands.
But when I execute the below code.. it is displaying the output on the screen directly instead of storing to variable
... (3 Replies)
Discussion started by: giridhar276
3 Replies
LEARN ABOUT SUSE
whereis
WHEREIS(1) General Commands Manual WHEREIS(1)NAME
whereis - locate the binary, source, and manual page files for a command
SYNOPSIS
whereis [-bmsu] [-BMS directory... -f] filename...
DESCRIPTION
whereis locates source/binary and manuals sections for specified files. The supplied names are first stripped of leading pathname compo-
nents and any (single) trailing extension of the form .ext, for example, .c. Prefixes of s. resulting from use of source code control are
also dealt with. whereis then attempts to locate the desired program in a list of standard Linux places.
OPTIONS -b Search only for binaries.
-m Search only for manual sections.
-s Search only for sources.
-u Search for unusual entries. A file is said to be unusual if it does not have one entry of each requested type. Thus
`whereis -m-u *' asks for those files in the current directory which have no documentation.
-B Change or otherwise limit the places where whereis searches for binaries.
-M Change or otherwise limit the places where whereis searches for manual sections.
-S Change or otherwise limit the places where whereis searches for sources.
-f Terminate the last directory list and signals the start of file names, and must be used when any of the -B, -M, or -S options are
used.
EXAMPLE
Find all files in /usr/bin which are not documented in /usr/man/man1 with source in /usr/src:
example% cd /usr/bin
example% whereis -u -M /usr/man/man1 -S /usr/src -f *
FILES
/{bin,sbin,etc}
/usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,
X386,TeX,g++-include}
/usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}
SEE ALSO chdir(2V)BUGS
Since whereis uses chdir(2V) to run faster, pathnames given with the -M, -S, or -B must be full; that is, they must begin with a `/'.
whereis has a hard-coded path, so may not always find what you're looking for.
AVAILABILITY
The whereis command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
8 May 1994 WHEREIS(1)