10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to xheck if a file exists that uses wildcards as only the partial filename is known using the test Command, and when it exists then output just the number of lines in the file... do not include the filename. Then this output, is it captured by the CommandOutput or the ReturnValue as I want... (2 Replies)
Discussion started by: dsinco
2 Replies
2. Shell Programming and Scripting
Hi Team,
-rwxr-xr-x 1 kmani00 system 9 Nov 08 03:29 tempfile.txt
-rwxrwxrwx 1 kmani00 devgrp 0 Nov 08 03:32 testfile.txt
by exec the following command, i did not get any output.
> test -s tempfile.txt
> a=`test -s tempfile.txt`
> echo $a
>
by exec the... (4 Replies)
Discussion started by: kmanivan82
4 Replies
3. Shell Programming and Scripting
hello ,
I need to check how many parallel ssh connections my server can take the load of.
I need to login to different host which i am planning to read from a file and then a write a loop which will do parallel ssh.
Please provide suggestion on how i can write script for the same.\
Thank... (1 Reply)
Discussion started by: ABHIKORIA
1 Replies
4. Shell Programming and Scripting
On a very new (11.31) hpux machine, I can no longer execute shell fragements like:
if ; then
. .profile.foo
fi
and get "ksh: test: argument expected"
if I convert this to -d or -f as appropriate (which I've not had to do on older versions of hpux (11.23) nor any other unix platform... (9 Replies)
Discussion started by: Peeter Joot
9 Replies
5. Shell Programming and Scripting
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)
Discussion started by: Max89
1 Replies
6. UNIX for Dummies Questions & Answers
Hello, i have a script which checks if the user entered 8 numeric characters in the form of YYYYMMDD (birth date). If the user entered any non numeric characters, an error will be displayed:
# Check to see if the 8 characters are all numbers
# If not show error essage
# And prompt user... (4 Replies)
Discussion started by: netmaster
4 Replies
7. Shell Programming and Scripting
Hi,
I need to do a test Telnet in KSH and if the connection is good then disconnect the telnet session with out logging in and without exiting the shell script.
Example output of a good connection:
$telnet xxx.xx.xx.xxx xxxx
Trying xxx.xx.xx.xxx...
Connected to xxx.xx.xx.xxx.
Escape... (1 Reply)
Discussion started by: calex
1 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to test and see whether a variable that is being extracted from a line in a file is numeric or not. I have tried everything that I can think of and I cannot figure out how to get it to work. I am trying to test and see if the string extracted contains 5 numeric digits. This is what I... (8 Replies)
Discussion started by: developncode
8 Replies
9. Shell Programming and Scripting
Okay I will let users input spaces as well :)
I am having a mental block. I have done a couple of searches but havent found anything that I understand (the likes of :alpha: and awk).
Basically I want to give the user an option to enter some text which will go down as a field within a flat... (3 Replies)
Discussion started by: tugger
3 Replies
10. Shell Programming and Scripting
I'm trying to do a simple if statement that tests if a filename exists with a user specified string.
So say I have these files:
Assigned_1day_after_due_chuong
Assigned_1day_after_due_gallen
Assigned_1day_after_due_heidenre
and i'm running a script and want to know if a... (6 Replies)
Discussion started by: bob122480
6 Replies