while ! TRUE
do
print "enter a datafile number: "
read DBFILE
if [[ -n $DBFILE ]]
then
eval "
if [[ $DBFILE = ?($NEW_FILEID) ]]
then
DBFILE_VALID=true
else
print "invalid number"
fi
"
else
DBFILE_VALID=false
fi
done
The file numbers are generated dynamically thru sqlplus and placed into $NEW_FILEID. It all works great.
If I enter a character like !, ` , or # in response to the question "enter a datafile number?" it will stop the shell script and exit. How do I trap for those special characters?
Hi! I'm using
echo $string | grep "" -c
to test in a script if a string is a number and it seems to work. But how can i find, for example, if a string is a four figures number ?
Thanks to all! (2 Replies)
Okay, well this is more or less my first attempt at writing a shell script.
Anyways, here's my code:
cd ${PATH}
if
then
rm ${FILE}
./anotherScript
else
exit 1
fi
exit 1
Anyways, it's a pretty simple script that is supposed to search for the... (4 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hello all,
I'm trying to automate an if statement in my Perl script. The script opens an input file for reading, checks each line in the file for a particular substring, and if it finds the substring, writes it to an output file.
There are approximately 200 different input files. Each has... (3 Replies)
Hello,
I am trying to build a test statement but I can't make it work
I want to rearrange some fields, so if my "$cfg" variable contains a string ending with .log (*.log) I want to move it in another field.
Any help will be much appreciated!
Thank you
Shell:sh
if
then
log="${cfg}"... (9 Replies)
Is it possible to test against a varible within a ranges in a if statement.
ex.
if ];then
echo "not in range"
else
echo "number within range"
fi (8 Replies)
Discussion started by: leemalloy
8 Replies
LEARN ABOUT DEBIAN
ckport
ckport(1) System User's Manual: ckport ckport(1)NAME
ckport - portability analysis and security checking tool
SYNOPSIS
ckport [OPTIONS]... file [file,...]
DESCRIPTION
ckport is a tool to check already compiled binaries and libraries for porting and security problems.
It uses objdump to read the binaries and analysis call and jump functions.
This package is architecture independent and can be used on non-host architecture binaries if a objdump tool for the target architecture is
installed.
OPTIONS --help -h
Show this help.
-- End of options, only filenames follow.
--mode MODE
Sets mode of operation.
--db DBFILE
Load database DBFILE.
--db-dir DBDIR
Load databases from directory DBDIR.
--edit-vim
Show vim command pointing to location of problem.
--conf KEY=VAL
Set config key KEY to value VAL.
--warn-mode MODE
Set mode for printing of warnings.
--warn PT
Warn about problems of type PT.
--nowarn PT
Ignore warnings about problems of type PT.
--nowarns
Disable all warnings.
--nosummery
Disable summery.
--summery
Enable summery.
--summery-on-warn
Only print summery if warnings has been found.
--noheader
Disable printing of headers.
--header
Enable printing of headers.
--nofile-header
Disable printing of headers for each file (operant).
--file-header
Enable printing of headers for each file (operant).
--ignore PATTERN
Ignore symbols matching this Perl regex pattern.
--ignore-symbol SYMBOL
Ignore symbol SYMBOL.
--ignore-target TARGET
Ignore warnings for target TARGET.
--print-mode MODE
Set mode of symbol printing to MODE.
--print-unknown
Print unknown symbols found.
--print-unknown-defined
Print list of unknown but defined (internal) symbols.
--print-unused
Print list of defined (internal) but unused symbols.
--print-known
Print list of known symbols.
--print-pt
Print list of known problem types.
SEE ALSO objdump(1).
ckport April 2011 ckport(1)