Shell script file check throws [: too many arguments
While I am trying to check the filename/s in IF statement of a shell script (RedHat Linux 6) I am getting below error:
File check:
Throws error when there are multiple files in the location. But when there is 1 file match in the location it is working fine.
I have already tried with below options :
All the above cases it is not throwing error but it returns FALSE and executing the else block although the file is present in the location with timestamp
Could you please help me how I can use the if condition here to check whether the files are present in the location.
Hi,
I have a shell script Scp_1.sh for which I have to pass 2 arguments to run.
I have another script Scp_2.sh which in turns calls script Scp_1.sh inside.
How do I make Scp_1.sh script to read arguments automatically from a file, while running Scp_2.sh?
--
Weblogic Support (4 Replies)
Hi,
I am using SYBASE database. in my script i am connecting to DB via using isql.
isql -U${S_USER} -S${S_SERV} -D${S_DB} -P${S_PWD} -b0 -w3000 -h0 -s"|" -i${MYDIR}/ABC.sql -oXYZ.txt << FINSQL
i am taking a ABC.sql file to use the queries written in it and storing the output in... (3 Replies)
I have a shell script that takes 2 arguments. I will have to execute this script multiple times with different values for the arguments.
for example,
./shscript env1 value1
./shscript env1 value2
./shscript env2 value3
./shscript env3 value4
./shscript env1 value5
./shscript env3... (24 Replies)
for example I have
make target
file is optional. So can I check whether there is or no? I tried
if test $# -eq 1
then
path=$1
else path=$2
fi
But it doesnt work properlu ;(
Please use code tags next time for your code and data. (12 Replies)
I am getting the following error while passing parameter to a shell script called within awk script. Any idea what's causing this issue and how to ix it ? Thanks
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `./billdatecalc.sh ... (10 Replies)
Hi Experts,
I am not good in writing script. Just stared.I am looking for shell script to check following parameters.
1) Number of files on remote Linux SUSE server.- Any directory and sub directory.
2) I should define number of files in script. Files should be variable.
3) Age of... (2 Replies)
Hi All,
I have below simple shell script in cloudera quick start vm cenos 6 which copy file from source to destination.
# file_copy.sh
source_dir = ${source_dir}
target = ${target_dir}
cp source_dir target
and my parameter file is like below
#parameter_file.txt
source_dir =... (4 Replies)
I'm required to write a simple shell script that when it runs it writes the output which is a simple barcode to a tmp flat file which I can do the bit I'm struggling with...
The next time it runs I need to check the tmp output file to see if that barcode is in the output file and if it is send... (5 Replies)
Discussion started by: worky
5 Replies
LEARN ABOUT DEBIAN
ns_server
ns_info(3aolserver) AOLserver Built-In Commands ns_info(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_info, ns_server, ns_stats - commands
SYNOPSIS
ns_info address
ns_info argv0
ns_info boottime
ns_info builddate
ns_info config
ns_info home
ns_info hostname
ns_info interp
ns_info label
ns_info log
ns_info name
ns_info pageroot
ns_info platform
ns_info server
ns_info tcllib
ns_info uptime
ns_info version
ns_server option ?arg arg ...?
ns_stats option ?arg arg ...?
_________________________________________________________________DESCRIPTION
ns_info boottime
Returns the server boot time in seconds.
ns_info config
Returns the configuration file name.
ns_info home
Returns the directory where the AOLserver was installed.
ns_info hostname
Returns the name of the host on which server is running (e.g., www.myhost.com).
ns_info interp
Returns the number of the Tcl interpreter currently being used.
ns_info label
Returns the source code label for the server. If no label was used, "unlabeled" is returned.
ns_info log
Returns the location of the server log file (e.g., /home/myserver/log/server.log).
ns_info name
Returns the name of the AOLserver. It's usually "AOLserver."
ns_info pageroot
returns the directory containing the HTML pages for this virtual server.
ns_info platform
Returns the name of the platform that the server is running on (e.g., Solaris).
ns_info server
returns the name of this virtual server.
ns_info tcllib returns the directory where the AOLserver Tcl source code resides for this virtual server.
ns_info uptime returns the time in seconds that the server has been up.
ns_info version returns the version of the AOLserver.
SEE ALSO nsd(1), info(n)
KEYWORDS AOLserver 4.0 ns_info(3aolserver)