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
tqslcert
TQSLCERT(1) General Commands Manual TQSLCERT(1)NAME
TrustedQSL - digitally sign amateur radio contact logs
SYNOPSIS
tqslcert [certificate-file]...
tqsl [OPTIONS] [log-file]...
DESCRIPTION
TrustedQSL is a file format and set of procedures that is used to send digitally signed QSL information (logs of contacts between amateur
radio operators). One notable service that makes use of TrustedQSL is ARRL's Logbook of the World.
The tqslcert program is used to generate requests for digital certificates and to store the resulting received digital certificates.
The tqsl program is used to digitally sign contact log files using a digital certificate.
This manual page briefly documents the tqslcert and tqsl programs. Complete documentation is also available:
tqslcert: file:///usr/share/TrustedQSL/help/tqslcert/main.htm
tqsl: file:///usr/share/TrustedQSL/help/tqslapp/main.htm
OPTIONS
tqslcert accepts TQSL certificate files which may optionally be specified on the command line.
tqsl accepts these command line options:
-d Suppress date-range dialog. If present, the QSO date-range dialog will not be shown for files that follow this option on the command
line.
-l location_name
Selects an existing station location. This location will be used for the commands that follow. If the station location doesn't
exist, tqsl will just exit.
-o output_file
Writes the resulting signed log file to output_file instead of a default name based on the input log-file name.
-s Add or edit station location. If there is a preceding -l option the specified location will be edited. If there is no preceding -l
option, a new station location is being added.
-x (or) -q
Exit tqsl. If this argument is used it should be the last one on the command line. If this argument is not present, tqsl will begin
normal operation after successfully processing all command-line arguments.
log-files
Any command-line parameter that is not an option or an option's argument will be treated as the name of a log file (ADIF or
Cabrillo) to be signed. The resulting signed file (.tq8) will be placed in the same directory as the log file, overwriting any
existing .tq8 file of the same name. (Note: If this option is not preceded by a -l option that selects the station location to be
used for signing, the Select Station Location for Signing dialog will be presented.) File names that contain spaces or other shell-
special characters should be quoted in a manner suitable for the operating system and shell that's being used.
N.B.: If the private key needed to sign a log is protected by a password, the user will be prompted to supply that password for each
file being signed.
AUTHOR
trustedqsl was written by "American Radio Relay League, Inc.".
This manual page was prepared by Kamal Mostafa <kamal@whence.com>, for the Debian project (and may be used by others).
March 31, 2011 TQSLCERT(1)