04-16-2020
#!/bin/bash should make the script interpreted by bash IF you call/execute the script by its name: myScriptName.sh
(unless you call/execute the script by something similar to: sh myScriptName.sh)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i require a utility that identifies all users currently logged into the system. It should create a file called logfile which contains a list of usernames together with a count of how many login sessions they are currently running, for example
coc9io : 1
hbh8jd : 3
dg7hy : 1
root : 4
it... (3 Replies)
Discussion started by: peter112
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is anyone can help me to find out the difference in Shell Scripts between HP and Sun.
Thanks in advance,
Vijay R (3 Replies)
Discussion started by: rv_kumar
3 Replies
3. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies
4. Shell Programming and Scripting
I have a program (say, MyProgram) written in Bourne-shell script, but at some point it calls another script written in pearl, as illustrated below:
#!/bin/sh
.....
case $x in
1) ConfigSystem1 ( b-shell script)
2) ConfigSystem2 ( pl)
3) ConfigSystem3 (b-shell)
....
Then I create... (0 Replies)
Discussion started by: bluemoon1
0 Replies
5. Solaris
Hi
I am getting some errors when i am running the shell script using the following syntax:
>abc.sh
but the same script works fine with the following syntax:
>sh abc.sh
wats the difference in both....please help
thanks in advance. (6 Replies)
Discussion started by: arpit_narula
6 Replies
6. Shell Programming and Scripting
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies
7. Shell Programming and Scripting
I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done.
I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies
8. Shell Programming and Scripting
for (( i=1; i<=3; i++ )); do
for (( j=1; j<=3; j++ )); do
for (( k=1; k<=3; k++ )); do
echo $i$j$k
done
done
done
Will the above code work on a BOURNE shell?
As far as my understanding is, if I am writing the above code in a file..say lol.sh and then running it through the terminal using... (7 Replies)
Discussion started by: navienavnav
7 Replies
9. Shell Programming and Scripting
Hi All,
I need some urgent help regarding some info.
I have a cluster of servers for which I have two scripts for management.
control.sh is a bash script meant for restarting/stopping the servers.
manger.ksh is a kshell script. It is a master script to manage restarting/stoppping and... (3 Replies)
Discussion started by: ankur328
3 Replies
10. UNIX for Beginners Questions & Answers
Hello... and thanks in advance for reading this or offering me any assistance
I'm trying to understand specific differences between the various login scripts... I understand the differences between interactive vs non-interactive and login vs non-login shells... and that's not where my question... (4 Replies)
Discussion started by: bodisha
4 Replies
LEARN ABOUT DEBIAN
dpkg-www
DPKG-WWW(1) General Commands Manual DPKG-WWW(1)
NAME
dpkg-www - program to remotely open a WWW Debian package browser
SYNOPSIS
dpkg-www [-s|--stdout] [-h|--host host] [query]
DESCRIPTION
dpkg-www is used to remotely control a WEB browser and open a dpkg URL on the local host from an interactive shell or script.
If the command is invoked while running under X-window the script will try to find an installed X browser to open the specified URL. If
not running under X it will try to use a text browser instead.
If Netscape is found and a Netscape instance is already running it will be asked to open the dpkg URL on localhost with the optional query
supplied on the command line. If there is no browser running, it will start automatically a new one.
The functionality provided by this program is identical to running a web browser with the -remote openURL(http://localhost/cgi-bin/dpkg)
argument or opening the same URL from within the browser.
dpkg-www-installer is an helper application which can configured in the WWW browser for web installation. It should never be invoked
directly by the user.
OPTIONS
-s, --stdout
Redirect output to stdout. Requires one of the text browsers (lynx, lynx-ssl or links) installed.
-h, --host host
Send the query to a remote host, where dpkg-www must be installed.
query Specifies an optional package name, an absolute pathname or a query argument which is passed to the dpkg cgi-bin. See dpkg-www(8)
for more information about the use of the cgi.
FILES
/etc/dpkg-www.conf
~/.dpkg-www
Configuration files for dpkg-www. It is not necessary for these files to exist, there are sensible defaults for everything, but you
can specify your preferred www browser with the DPKG_WWW_BROWSER variable, for example: DPKG_WWW_BROWSER=mozilla
EXAMPLES
dpkg-www
This would open a dpkg URL on localhost listing all the installed packages.
dpkg-www bash
This would open a dpkg URL asking info on the bash package.
dpkg-www -h pisolo bash
This would open a dpkg URL asking info on the bash package on host pisolo.
dpkg-www 'dpkg*'
This would open a dpkg URL listing all packages matching dpkg*.
dpkg-www /bin/bash
This would open a dpkg URL asking info on the package(s) owning the file /bin/bash .
dpkg-www depends=svgalib
This would open a dpkg URL listing all packages depending on svgalib.
dpkg-www --stdout depends=awk | grep ^ii
This would list on stdout all packages depending on awk and grep all lines of installed packages.
SEE ALSO
dpkg(8), dpkg-www(8)
AUTHOR
Massimo Dal Zotto <dz@debian.org>.
Bugs should be reported via the normal Debian bug reporting system.
LICENCE
dpkg-www is licensed under the GNU General Public License version 2.
September 1, 2004 DPKG-WWW(1)