473,383 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

"too many arguments" message

Hi everybody!
My first post here...hope to learn quickly.
I just mounted a debian server and start to run some few scripts. They "seem" to run, but sometimes (5% of times) I am getting this error message:

Expand|Select|Wrap|Line Numbers
  1. /home/jmd/sh/cartas.sh: line 2: [: too many arguments
This is /home/jmd/sh/cartas.sh:
Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. if [ -z $(ls /home/as400/cartas) ]
  3. then
  4.         echo "" > /dev/null
  5. else
  6.         /home/jmd/sh/cartastxt.sh
  7. fi
And this is /home/jmd/sh/cartastxt.sh
Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. touch /home/as400/cartas/prueba.txt
  3. chown nobody:desa /home/as400/cartas/*
  4. chmod 660 /home/as400/cartas/*
  5. mv /home/as400/cartas/* /home/datos/comercial/cartas/
  6. rm /home/datos/comercial/cartas/prueba.txt
What is driving me crazy is that messages just appear sometimes.
Youy might know that files are send to /home/as400/cartas from a IBM iseries using ftp.
Thank you very much for your help!
Oct 11 '07 #1
1 2785
Motoma
3,237 Expert 2GB
You are getting an the error "Too many arguments" on this line:

if [ -z $(ls /home/as400/cartas) ]

What are you trying to do here? What could the message be referring to as arguments?
Oct 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: J. Muenchbourg | last post by:
I'm getting an "Arguments are of the wrong type, out of acceptable range, in conflicts with each other " error , pointing to the sql statement in this block: Dim rstime Set rstime =...
1
by: Ajax Chelsea | last post by:
1,int (*f)(int a = 1);//is it legal? 2,int (*f)(int a = 1); int g(int a = 2){return 0;} f = &g;//is it legal?
1
by: iam247 | last post by:
Hi I have a web page which receives information from a form (using request.form) and also attempts to look at an Access query to read in recoeds to a variable named rsGroup. When I have the...
4
by: dbuchanan | last post by:
Hello, I have an audit table into which I insert information about the use of the application. This works sometimes and other times fails. I cannot find any reason for it failing. It is always...
7
by: runsun pan | last post by:
I wanna check if an object is the *arguments* object of a function, is that possible? When we do: typeof(arguments) it always returns "object", doesn't seem to be helpful.
1
by: Java Guy | last post by:
I'm trying to view a web page. IE tells me there are (Java?) errors on the page. Here they are: Line: 15 Char: 7 Error: Wrong number of arguments or invalid propert assignment Code: 0 URL:...
0
by: thepisu | last post by:
I have a Windows 2003 Server with IIS 6, PHP with CGI. Yesterday I decided to update from PHP 5.1.4 to 5.2.1, but "slash arguments" (in a Moodle installation) stop working, I mean addresses like...
4
by: JamesG | last post by:
Hi, I'm new to C-Sharp (as of today) and i'm struggling to implement a SOAP client to a PHP5 web service. I have added the Web Reference (do I also need to use wsdl.exe and compile the .dll, and...
3
by: DrVitoti | last post by:
On that program the compiler says "parse error" on line 8, 10, 12 and 21, it also says "too many arguments" on lines 10, 12 and finally it says "at this port in" on lines 13, 14, 20 . How could I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.