10-16-2008
New to shell script and lost....
I am really stuck on something I am sure you all will find simple.
I am VERY new to shell scripting and I am trying to figure out how to do a or statement below. So if it = 11 or 31 then...
if [ $? != '11' ]; then
Please keep in mind I do not know much on shell scripting and thank you in advance as I learn.
Last edited by LRoberts; 10-16-2008 at 12:47 PM..
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
First time so excuse my ignorance please.
I may not be accurately describing the issue.
I have inherited a small lab mostly SUN V120s.
We lost power and are trying to recover.
Nope no backups...
The primary issue I have is 1 box is an Oracle Server.
It has 2 36Gb harddrives.
I am able to... (3 Replies)
Discussion started by: murphsr
3 Replies
2. UNIX for Advanced & Expert Users
Hi,
I was trying to call "script <an ip add>" command from .profile file to log everything whenever anyone logs in to this user. I did the following at the end of .profile. 1) Extracted the IP address who logged in 2) Called script < ip add> . The problem I am facing is all, aliases etc. written... (3 Replies)
Discussion started by: amicon007
3 Replies
3. Post Here to Contact Site Administrators and Moderators
Hi,
yesterday I have got reply in my thread
how to redirect shell pipe to 2 pipes.
I would read that answer once again,
as my re.re. is also lost
Jack (6 Replies)
Discussion started by: jack2
6 Replies
4. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have just gotten into writing bash scripts for a class, part of the assignment is to read and be able to tell... (4 Replies)
Discussion started by: Byrang
4 Replies
5. Shell Programming and Scripting
Hi,
I want to do SSH on many different machines and then run some commands on them. A binary application randomly generates IP addresses and my script will take care of doing SSH.
$ ./IPGen.exe | ./myScript.sh
my script looks like this:
while read line; do
result1=$(ssh $line... (2 Replies)
Discussion started by: siavash
2 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hey whats up everyone,
Currently I'm stuck. In this question I have to use the following commands test, shift,... (7 Replies)
Discussion started by: AdamSahp
7 Replies
7. Shell Programming and Scripting
Hi,
I have a bash script to run many system commands on CentOS machine, but I am puzzled by some commands had no effect on parent environment.
For example, I want to refresh the desktop xdg menu when some processes added or deleted items from desktop xdg menu. If I run "killall gnome-panel"... (4 Replies)
Discussion started by: hce
4 Replies
8. Programming
Hi there,
im just having a hard time understanding why this code does not print anything that is suppose to print:
score = raw_input ('what is your score? \n')
try:
if 1.0 == float(score) >= 0.9:
print "A"
elif 0.9 > float(score) >= 0.8:
... (1 Reply)
Discussion started by: la2015
1 Replies
9. Shell Programming and Scripting
Hi,
i want use this Comand for my psql request
sh ssh -o StrictHostKeyChecking=no rootatemailaddress.de sudo psql -U postgres -c "select pg_terminate_backend(pid) from pg_stat_activity where datnam=\'$DB\';"'"
but the shell lost the inverted comma for datnam=\'$DB\'. The request deliver... (2 Replies)
Discussion started by: peterpane007
2 Replies
LEARN ABOUT DEBIAN
gpm.conf
GPM.CONF(5) BSD File Formats Manual GPM.CONF(5)
NAME
gpm.conf -- startup configuration file for gpm
DESCRIPTION
gpm.conf specifies options to be passed to the gpm daemon at start time. It is parsed by the init script, rather than by gpm itself. It
comprises variable assignments in Bourne shell syntax: variable=value (with no extra spaces; to embed spaces or other shell metacharacters in
values, use quotes as in shell scripting). Blank lines and lines beginning with a hash ("#") are ignored.
Settings are implemented by setting flags on the gpm command line; these are documented in gpm(8). The following variable names are speci-
fied:
device Specifies the device file for your primary mouse. This sets -m.
type Specifies the protocol for your primary mouse. This sets -t.
device2, type2
The same as device and type, but for your secondary mouse. These set -m and -t after passing -M. If either of these are
defined, both must be.
responsiveness
Specifies the responsiveness for your primary mouse. This sets -r.
sample_rate Specifies the sample rate for your primary mouse. This sets -s.
repeat_type Enables the gpm repeater and sets the repeater protocol, using the -R flag. Repeat type none or an empty value will disable
the repeater.
append Any options specified here are appended to the gpm command line. If you use multiple options, you will need to enclose the
value in quotes ("").
EXAMPLES
A simple gpm.conf file for a PS/2 mouse whose protocol should be autodetected, and which should be repeated in /dev/gpmdata as a serial Mi-
crosoft Intellimouse:
# Sample gpm.conf
device=/dev/psaux
type=autops2
repeat_type=ms3
This will cause the daemon to be started as gpm -m /dev/psaux -t autops2 -Rms3.
FILES
/etc/gpm.conf
SEE ALSO
gpm(8), dpkg-reconfigure(8). dpkg-reconfigure gpm can be used to generate and update the gpm.conf file automatically.
Debian 3.0 January 5, 2005 Debian 3.0