04-09-2011
Mostly the $hour and $min fields are not getting the numeric, so in the If conditions -gt and -ge not able to do comparison with those field .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Cannot figure out what the error is on line #10
I was trying to change my login prompt though I've success with that this shows up as well.
Here's what I have (1 Reply)
Discussion started by: moonunit
1 Replies
2. Shell Programming and Scripting
Hi,
echo $i
until ||
do
read NUM
if && ; then
printf "$FBOLD\nInvalid number, please enter valid backup number: $FREG"
fi
done
Getting below error :
./import_location.sh: line 234: [: : integer expression expected
./import_location.sh: line 234: [: :... (5 Replies)
Discussion started by: milink
5 Replies
3. Shell Programming and Scripting
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
Discussion started by: ketkee1985
3 Replies
4. Shell Programming and Scripting
root@server01 # df -h | grep /tmp | awk {'print $3}'
252M
root@server01 #
root@server01 # cat /usr/local/tmpchk.sh
#!/bin/sh
x=`df -h | grep /tmp | awk {'print $3}'`
if ;
then
rm -fr /tmp/somefolder/
else
echo "its small" (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies
5. Shell Programming and Scripting
Newb here
echo "$yesterdaysclose"
echo "$close"
if ; then
echo "stocks moving up"
elif ; then
echo "stock is moving down"
else
echo "no change"
fi
seems to evaluate the floating decimal correctly however returns
./shellscript1.sh: line 17: [: : integer expression expected... (3 Replies)
Discussion started by: harte
3 Replies
6. Shell Programming and Scripting
hi Guys,
when i run the below script its showing error "integer expression expected"
script pasted below:
#!/bin/sh
for i in {1..$2}
do
if
then
scp server1:/root/file.2012-$1-0$i .
else
scp server1:/root/file.2012-$1-$i .
fi
done (8 Replies)
Discussion started by: ganga39
8 Replies
7. Shell Programming and Scripting
Hi,
I have placed the script and running successfully on AIX
However in Linux it throws integer expression expected
Could some one please help me to fix this
MaxThreshold4alert=`echo "$MaxCapacitycnt*(80/100)" |bc -l`
echo $MaxThreshold4alert
Error:
40.00000000000000000000: integer... (2 Replies)
Discussion started by: ajothi
2 Replies
8. Shell Programming and Scripting
I need some help with this
if
but then it says
line 11:
I don't know what I'm doing wrong (1 Reply)
Discussion started by: margg
1 Replies
9. Shell Programming and Scripting
Hi,
I am getting the below error while comparing the month of a file to current month.
I am using ls -lrth to get the month of that file and while using the if else condition i am getting the below error..
a1=`ls -lrth abc.txt | awk '{print substr($6,1,3)}'`
This gives me the month from... (1 Reply)
Discussion started by: jaituteja
1 Replies
10. Shell Programming and Scripting
Hello ,
This is the piece of the code which is giving me trouble
if ;then
exit_proc "${SOURCEDIR}/${OUT_FILE} does not exists or not readable" 2
else
word_count=`wc -l < ${SOURCEDIR}/$OUT_FILE`
fi
if ;then
exit_proc "Word_count is more than allowed limit" 1
else... (6 Replies)
Discussion started by: Sri3001
6 Replies
LEARN ABOUT NETBSD
dm.conf
DM.CONF(5) BSD File Formats Manual DM.CONF(5)
NAME
dm.conf -- dungeon master configuration file
DESCRIPTION
The dm.conf file is the configuration file for the dm(8) program. It consists of lines beginning with one of three keywords, badtty, game,
and time. All other lines are ignored.
Any tty listed after the keyword badtty may not have games played on it. Entries consist of two white-space separated fields: the string
badtty and the ttyname as returned by ttyname(3). For example, to keep the uucp dialout, ``tty19'', from being used for games, the entry
would be:
badtty /dev/tty19
Any day/hour combination listed after the keyword time will disallow games during those hours. Entries consist of four white-space separated
fields: the string time, the unabbreviated day of the week and the beginning and ending time of a period of the day when games may not be
played. The time fields are in a 0 based, 24-hour clock. For example, the following entry allows games playing before 8AM and after 5PM on
Mondays:
time Monday 8 17
Any game listed after the keyword game will set parameters for a specific game. Entries consist of five white-space separated fields: the
keyword game, the name of a game, the highest system load average at which the game may be played, the maximum users allowed if the game is
to be played, and the priority at which the game is to be run. Any of these fields may start with a non-numeric character, resulting in no
game limitation or priority based on that field.
The game default controls the settings for any game not otherwise listed, and must be the last game entry in the file. Priorities may not be
negative. For example, the following entries limits the game ``hack'' to running only when the system has 10 or less users and a load aver-
age of 5 or less; all other games may be run any time the system has 15 or less users.
game hack 5 10 *
game default * 15 *
FILES
/etc/dm.conf The dm(8) configuration file.
SEE ALSO
setpriority(2), ttyname(3), dm(8)
BSD
May 31, 1993 BSD