Which shell are you using ?
try to
double the bracket [[ ]]
initialize your variable
gather the contitions into one bracket [[ || ]] instead of [[ ]] || [[ ]]
remove the double quote inside condition brackets (should be the last thing to try)
... and see if a miracle happen
what about this statement :
shouldn't it be smthg like
or whatever format should $FBOLD fit
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)
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)
Ok, so I am beggining a script to factor the time difference from when a user logs on to current time but before I can even get too far I am getting the INTEGER EXPRESSION EXPECTED error. Can someone tell me what I am doing wrong?
lhour=$(who | grep "$1" | cut -c30,31);
lmin=$(who | grep "$1"... (1 Reply)
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)
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)
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)
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)
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 DEBIAN
aa-notify
AA-NOTIFY(8) AppArmor AA-NOTIFY(8)NAME
aa-notify - display information about logged AppArmor messages.
SYNOPSIS
aa-notify [option]
DESCRIPTION
aa-notify will display a summary or provide desktop notifications for AppArmor DENIED messages.
OPTIONS
aa-notify accepts the following arguments:
-p, --poll
poll AppArmor logs and display desktop notifications. Can be used with '-s' option to display a summary on startup.
-f FILE, --file=FILE
search FILE for AppArmor messages
-l, --since-last
show summary since last login.
-s NUM, --since-days=NUM
show summary for last NUM of days.
-u USER, --user=USER
user to drop privileges to when running privileged. When used with the -p option, this should be set to the user that will receive
desktop notifications. This has no effect when running under sudo.
-w NUM, --wait=NUM
wait NUM seconds before displaying notifications (for use with -p)
-v, --verbose
show messages with summaries.
-h, --help
displays a short usage statement.
CONFIGURATION
System-wide configuration for aa-notify is done via /etc/apparmor/notify.conf:
# set to 'yes' to enable AppArmor DENIED notifications
show_notifications="yes"
# only people in use_group can use aa-notify
use_group="admin"
Per-user configuration is done via ~/.apparmor/notify.conf:
# set to 'yes' to enable AppArmor DENIED notifications
show_notifications="yes"
BUGS
aa-notify needs to be able to read the logfiles containing the AppArmor DENIED messages.
If you find any additional bugs, please report them to Launchpad at <https://bugs.launchpad.net/apparmor/+filebug>.
SEE ALSO apparmor(7)AppArmor 2.7.103 2012-06-28 AA-NOTIFY(8)