10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
May i please know how do i check if the given input argument is one of the listed numbers then success else failure. I am using bash shell.
if
then
echo "success"
else
echo "failure"
fi
Thank you. (2 Replies)
Discussion started by: Ariean
2 Replies
2. Shell Programming and Scripting
Hi Gurus,
I need check existing number of file based on the list in file list.
for example:
in my file list. I have below:
abc, file1.txt
abc, file2.txt
abc, file3.txt
abc, file4.txt
cde, filea1.txt
cde, filea2.txt
cde, filea3.txt
...
in my current file direcotry, I have file:... (0 Replies)
Discussion started by: ken6503
0 Replies
3. Shell Programming and Scripting
Hi,
We are getting a curios result in one of AIX script. Its executed using !/bin/ksh .
After following line we get result of 3 in in the variable instance_count.
instance_count=`ps -ef | grep "script_check_instances.sh" | grep -v "grep" | wc -l`
But once we do a "ps -aef | grep... (2 Replies)
Discussion started by: niba
2 Replies
4. Shell Programming and Scripting
I have 2 and three params, both I should make sure thay numbers at one single line insted of checking for each one .
Example I wroote the following way.. checking for 2 and three seperately but I shud be able to do it at on statement
echo $2 | egrep '^+$' >/dev/null 2>&1
if ; then
echo... (2 Replies)
Discussion started by: raopatwari
2 Replies
5. Shell Programming and Scripting
Hey,
I am trying to check if an integer is even in a tcsh script
This is what I am running now
set lattest = ` echo $latmin "%2" | bc -l `
echo $lattest
if ( $lattest == 0 ) then
echo "min is already even"
else if ( $lattest =! 0 ) then
set latmin = ` echo $latmin "+1" |... (2 Replies)
Discussion started by: travish12
2 Replies
6. Shell Programming and Scripting
Hi,
I have one file like 00123. And this file name is generated as a sequence.
So how can I confirm the generated file name is a number, not a special character or alphabets.
Can anybody help me out.
Thanks in advance. (3 Replies)
Discussion started by: Kattoor
3 Replies
7. Shell Programming and Scripting
hi,
I would like to calculate number of character for a number,
for exemple : 1200 --> there are 4 characters , 120001 -> 5 characters (4 Replies)
Discussion started by: francis_tom
4 Replies
8. Shell Programming and Scripting
Hi,,
this is returning true in all cases..( other than 10 dig number also)
what could be wrong?? (2 Replies)
Discussion started by: shellwell
2 Replies
9. Shell Programming and Scripting
Hi ,
I am facing a problem .. which looks simple... but took 2 days of mine.. even now it is not solved completely..
I have one variable..., want to know whether that variable contains number... canbe +ve or -ve ...
Values
+35 --- number
-43 --- number
45A -- non number... (12 Replies)
Discussion started by: shihabvk
12 Replies
10. UNIX for Dummies Questions & Answers
If I have a variable $X, how do I check it is a number?
Many thanks. (2 Replies)
Discussion started by: handak9
2 Replies