08-31-2009
Ha figured it out. Apparently I was right about it not liking to count arguments in a variable, it had to be added inthe command line when the script itself was called.
Thanks for your help all. My program works great now ^_^ THANKYOU!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies
2. Shell Programming and Scripting
Can someone please help me with this SHELL script?
I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1.
Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies
3. Shell Programming and Scripting
I have a file in a Unix directory called 97210900.EFT
I am getting this error:
miis_ftp.ELM_EFT.shl: cd: bad argument count
+
+ type=1
+ ErrorHandle
Here is the piece of code that is checking the file
# Change the directory to one contains the file to be transported
##cd... (1 Reply)
Discussion started by: rechever
1 Replies
4. Shell Programming and Scripting
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Discussion started by: dcfargo
2 Replies
5. Shell Programming and Scripting
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies
6. Shell Programming and Scripting
Hello,
Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file
i.e I am workiing on a script which will run through crontab and the script will
chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I am running the script
VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt
result=`cat har1out.mytxt | grep $1'
echo $result
echo $1
{
if
then
echo pass
else
echo fail
fi (2 Replies)
Discussion started by: harsha85
2 Replies
8. Shell Programming and Scripting
Hi Team,
I am getting the below error when running the script. Please let me know how to solve this error.
start_WFA.sh: kill: bad argument count
Below is the Script:
#!/bin/ksh
kill -9 `ps -ef|grep classpath |grep "/apps/ap" |grep -v "Xmx" |grep $LOGNAME |awk '{print $2}'`
Thanks, (6 Replies)
Discussion started by: Mukharam Khan
6 Replies
9. Shell Programming and Scripting
What I'm trying to accomplish. I receive a Header and Detail file for daily processing. The detail file comes first which holds data, the header is a receipt of the detail file and has the detail files record count. Before processing the detail file I would like to put a wrapper around another... (4 Replies)
Discussion started by: pone2332
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
PHONE(1) General Commands Manual PHONE(1)
NAME
phone - Phone utility for DECnet
SYNOPSIS
phone [options]
Options:
[-vVh] [-s switchhook char] [initial command]
DESCRIPTION
phone is a program that allows the user to communicate interactively with users on VMS systems. Two user interfaces are available: X-Win-
dows (GTK+) and terminal (ncurses). If X-Windows is available and compiled into phone then it will be used unless the -n flag is present on
the command line.
After entering the phone command you will be presented with the phone screen which has windows for the chat and a command-line at the top.
If you are not talking to another user then you can enter commands directly, otherwise you will need to precede commands with the 'switch
hook' character, which defaults to the percent sign (%).
You can also enter a command for phone on the shell command-line. This command will be executed when phone starts up. This makes it conve-
nient to enter commands such as:
'phone answer' or 'phone marsha::chrissie'
In command mode phone understands several commands:
DIAL <node::user> Call a user
ANSWER Answer an incoming call
REJECT Reject an incoming call
EXIT or QUIT Return the the command prompt
HOLD Hold all callers
UNHOLD Unhold callers
HANGUP Hangup the phone
DIR <node> Show users logged into <node>
FACSIMILE <file> Send <file>
HELP Show this help
All commands (apart from QUIT and EXIT) can be abbreviated to 3 characters and all (really all this time) commands are case insensitive.
OPTIONS
-h -? Displays help for using the command.
-V Show the version of phone.
-s Set the switch hook character. This is the character used to switch from talking to another user and entering PHONE commands when
using the terminal interface.x
-n Disables use of the X-windows user interface. Use this to run phone in an xterm.
SEE ALSO
phoned(8)
DECnet utilities March 26 1999 PHONE(1)