Sponsored Content
Top Forums Shell Programming and Scripting bad argument count, tryig to FTP Post 302336149 by rechever on Tuesday 21st of July 2009 10:20:47 AM
Old 07-21-2009
bad argument count, tryig to FTP

I have a file in a Unix directory called 97210900.EFT

I am getting this error:
miis_ftp.ELM_EFT.shl[81]: cd: bad argument count
+ [ ! -r 07210900.EFT ]
+ type=1
+ ErrorHandle

Here is the piece of code that is checking the file

[code]
# Change the directory to one contains the file to be transported
##cd $LocalDir;
cd $CDRemoteDir;
# Do an -r command on the desired file ensure that the file exist and readable
if [ ! -r $UpLoadFileName ]
then
type="1";
ErrorHandle;
fi
# Do an -s command on the desired file ensure that the file exist
# and is not null
if [ ! -s $UpLoadFileName ]
then
type="2";
ErrorHandle;
fi
[code] /

Last edited by rechever; 07-21-2009 at 11:58 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Count and Auto FTP

Hi, I really need to create a script that counts for file and ftp's them to a windows directory. !st problem i'm having is getting it to ftp withouty prompting me, i tried |& on the end of the ftp, but then it just hits a syntax error. 2nd problem is, i have to have a wildcard in this script. which... (3 Replies)
Discussion started by: dappa
3 Replies

2. UNIX for Dummies Questions & Answers

find out the line count over FTP connection

I need help to find out the number of lines in a file which exists in remote machine. I the remote machine, auto login is enabled. So I do not need to worry about the username or password. But the problem is, I do not know how I can find out the line count once I get the FTP prompt. (1 Reply)
Discussion started by: Rita_questions
1 Replies

3. UNIX Desktop Questions & Answers

ftp-count files

How can I count files on ftp-site? I'm connecting thru ftp and I want to count files in my ftp-directory. Thanks. (1 Reply)
Discussion started by: gd2003
1 Replies

4. UNIX for Advanced & Expert Users

Count total file downloaded using FTP

Hi All, I'm developing a FTP script as below: ftp -v -n <IP_ADDRESS> << EOF user avery jSqaqUU2 lcd /directory/folder/ ascii prompt mget * bye EOF I would like to enhance the script to count the total file downloaded. For example, once the script run i want the message "Total <n>... (1 Reply)
Discussion started by: cas553
1 Replies

5. Shell Programming and Scripting

argument count

I'm writing a program that takes input from the user of a phone number or a name then either tells them if that entry doesn't exist in a text document or returns the entry if it does exist. But if they enter a name AND number it either returns the entry if it exists or adds it to the document. To... (17 Replies)
Discussion started by: javajynx
17 Replies

6. Linux

Serial terminal emulation - bad row column count ?

Hello, I connect to linux using serial cable from windows machine. I use putty as serial terminal emulator. Everything works fine except programs which scroll text - man, more, less, vi, etc.. These programs asumme my terminal size is 80cols x 24rows (my putty window size is more than that,... (1 Reply)
Discussion started by: vilius
1 Replies

7. Shell Programming and Scripting

Cannot compare argument in if statement in csh/grep command if argument starts with “-“

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

8. Shell Programming and Scripting

shell script for ftp files passed in command line argument

i want to write a shell script function that will ftp the files passed in the command line . i have written a shell script for ftp but how will it do for all files passed in command line argument , i am passing 4 files as argument ./ftp.sh file1 file2 file3 file4 code written by me... (5 Replies)
Discussion started by: rateeshkumar
5 Replies

9. Shell Programming and Scripting

kill: bad argument count

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

10. Ubuntu

Bad argument `5666'

Hello, When I type this command: iptables -I RH-Firewall-1-INPUT -p tcp -m tcp -dport 5666 -j ACCEPTit returns me :Bad argument `5666' Try `iptables -h' or `iptables --help' for more information. (5 Replies)
Discussion started by: inserm
5 Replies
add directory(1m)														 add directory(1m)

NAME
add directory - Adds a value to a modifiable, set-valued attribute (including application-defined attributes) of a directory SYNOPSIS
cdscp add directory directory-name attribute-name = attribute-value ARGUMENTS
The full name of the directory. The name of a particular attribute. Specify only one attribute at a time. See the cds_attributes file for the list of attributes that your application uses. attribute-value The value of a particular attribute. The value of an application- defined attribute is dependent on the type of attribute. See the cds_attributes file for the list of attributes and corresponding data types that your application uses. If you enter a byte data type, you must enter an even number of digits in length. You can only enter pairs of hexadecimal values for user-defined attributes. DESCRIPTION
The add directory command adds a value to a modifiable, set-valued attribute (including application-defined attributes) of a directory. If the attribute does not exist, this command creates it. Usually, this task is performed through the client application. See the DCE Admin- istration Guide for more information about attributes. Privilege Required You must have write permission to the directory. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
To add the value ontario to the attribute myname of a directory named /.:/sales, read the cds_attributes file to verify that the attribute shown in the following display exists: OID LABEL SYNTAX 1.3.22.1.3.91 myname char Enter the following command to assign the value ontario to the attribute myname: cdscp> add directory /.:/sales myname = ontario RELATED INFORMATION
Commands: remove directory(1m), show directory(1m) Books: OSF DCE Administration Guide add directory(1m)
All times are GMT -4. The time now is 01:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy