11-12-2003
You can't use > with a [ ] style test. You can use -gt with a [ ] style test. If that doesn't work for you. you have garbage in your variable.
You should switch to [[ ]] style tests but stay with -gt. > in legal with [[ ]] but it is not a numeric test.
10 More Discussions You Might Find Interesting
1. Programming
i keep getting the following error with the code segment below when i try to compile the program.
The code is from 'defs.h'
parse error before '('
parse error before ')'
stray '\' in program
this is the code segment and the error is on the second line of the segment
#define... (1 Reply)
Discussion started by: token
1 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to set up a secure and trusted connection between 2 boxes running solaris using ssh2.
I've run ssh-keygen2 on the local box and on the remote box, created the identification file ( IdKey id_dsa_2048_a ) on the local machine and copied across the public key file from the local to... (5 Replies)
Discussion started by: PaulC
5 Replies
3. Shell Programming and Scripting
How to use OR with If for string comparison??
What is wrong in these two codes??
1.
if test $1 != "SO" OR $1 != "NO"
then
echo "Invalid"
else
echo "Valid"
2.
if(( $1 != "SO" || $1 != "NO" ))
then
echo "Invalid"
else
echo "Valid"
Please help? (2 Replies)
Discussion started by: sandeep_hi
2 Replies
4. HP-UX
I have a cronjob that I need to run everyday and it needs to have todays date inputed, here is what I have, but is not working as expected..........
23 02 * * * cd /path;./RequestSummaryReport.sh $(date +%Y-%m-%d)
the output from mail gives me.............
Date: Fri, 8 Feb 2008 02:12:07... (4 Replies)
Discussion started by: theninja
4 Replies
5. Shell Programming and Scripting
I try to compare the day and month of someones birthday with the day and month of today, so my little bash script can send a mail to the person that has its birthday that day.
The first line of the file birthdays looks like this:
firstname,lastname,01/01/1990,....
The variable birthday's... (4 Replies)
Discussion started by: doc.arne
4 Replies
6. Shell Programming and Scripting
Hello All
I have a set of files, each one containing some lines that follows that regex:
regex='disabled\,.*\,\".*\"'and here is what file says about each files:
file <random file>
<random file> ASCII text, with CRLF line terminatorsSo, as an example, here is what a file ("Daffy Duck - The... (3 Replies)
Discussion started by: tukuyomi
3 Replies
7. UNIX for Dummies Questions & Answers
I am aware this question has been answered time and again. I feel I have tried everything I have seen on the net and really need help to get this working.
Same old story. Shell script, working from command but not from cron. I need my script to take values from a .properties file. Tried... (2 Replies)
Discussion started by: airalpha
2 Replies
8. Shell Programming and Scripting
What I have here is a pretty textbook recursive function. Its purpose right now is simply to display all folders that don't contain folders.
It works fine in all instances I can think of... except one. If there is a folder with a space in its name, the thing goes Kablooie.
AFAIK the problem comes... (5 Replies)
Discussion started by: divisionbyzero
5 Replies
9. Shell Programming and Scripting
I am trying to make all the fields containing lower case letters upper case and the third field of a file display ** instead.
I have this:
awk '{printf "%s %s ** %d %d\n", $1, $2, $4, $5}' database.txt | tr '' '' < database.txt
And that only changes it to upper case, other... (4 Replies)
Discussion started by: Bungkai
4 Replies
10. BSD
I am setting up a system as an ADSL gateway. ADSL is working fine. PF is not forwarding for some reason.
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33196
priority: 0
groups: lo
inet6... (0 Replies)
Discussion started by: John Tate
0 Replies
mbw(1) General Commands Manual mbw(1)
NAME
mbw - Memory BandWidth benchmark
SYNOPSIS
mbw [options] arraysize_in_MiB
DESCRIPTION
mbw determines available memory bandwidth by copying large arrays of data in memory.
OPTIONS
-q Quiet; suppress informational messages.
-a Suppress printing the average of each test.
-n <number>
Select number of loops per test
-t <number>
Select tests to be run. If no -t parameters are given the default is to run all tests. -t0: memcpy() test, -t1: dumb (b[i]=a[i]
style) test, -t2: memcpy() with arbitrary block size
-b <bytes>
Block size in bytes for -t2.
-h Show quick help.
USAGE
mbw will allocate two arraysize arrays in memory and copy one to the other. Reported 'bandwidth' is the amount of data copied over the
time this operation took.
Obviously mbw needs twice arraysize MiBytes (1024*1024 bytes) of physical memory - you'd better switch off swap or otherwise make sure no
paging occurs. Needless to say that it should not be run on a busy system.
TODO
Multiple thread support. Better configurability, including using getopt() for parsing arguments.
AUTHOR
andras.horvath@gmail.com
memory bandwidth benchmark Apr 26, 2006 mbw(1)