Sponsored Content
Full Discussion: parameter passing
Top Forums Shell Programming and Scripting parameter passing Post 302080659 by kekanap on Thursday 20th of July 2006 05:45:32 AM
Old 07-20-2006
Its not working:

/home/cerebrus/pax=>./class2.sh
+ bdf
+ awk { print $5 }
+ grep appsdev
+ 1> class3
+ dd=
+ [ -gt 95 ]
./class2.sh[8]: test: argument expected
+ echo FILES WONT BE DELETED
FILES WONT BE DELETED
+ echo

/home/cerebrus/pax=>
 

10 More Discussions You Might Find Interesting

1. Programming

Passing parameter to makefile?

Hi, How to pass parameter to makefile? Please let me know if any one knows and also please put an example of makefile with this feature. thanks, Manju. (3 Replies)
Discussion started by: manju_p
3 Replies

2. Shell Programming and Scripting

wrong parameter passing!

Hi all I have a script which will take input as filename and passes it to a java program. It is as follows -------------------------------- FILENAME=$1 echo $FILENAME ${JAVA_HOME}/bin/java -cp DateProvider $FILENAME ------------------------------------------------- when I execute the same... (2 Replies)
Discussion started by: malle
2 Replies

3. Shell Programming and Scripting

Passing asterisk As A Parameter

I have written a Shell Script Program which accepts 3 parameters as shown below: ./calc 20 + 2 in the above line ./calc is the Shell Script itself with 3 parameters, namely: 20 + and 2. Well, now let's look inside the Script: result=$1$2$3 echo $result The output will be as... (8 Replies)
Discussion started by: indiansoil
8 Replies

4. Shell Programming and Scripting

Parameter Passing problem

Hi All, I developed a KSH script which will accept two parameters as input. These two parameters are some directories paths. In the script i am validating the number of paramaters it received as below #-------------------------------------- # Check Command line arguments... (8 Replies)
Discussion started by: Raamc
8 Replies

5. Shell Programming and Scripting

Passing parameter in quotes

Hi, PW='/as sysdba'; export PW in other module I call sqlplus ${PW} (this line I unable to change!) How I can define PW so that sqlplus calls PW in quotes i.e sqlplus '/as sysdba' I tried like this PW="'/as sysdba'"; export PW - no luck Thanks in advance (2 Replies)
Discussion started by: zam
2 Replies

6. Shell Programming and Scripting

Positional parameter passing

Hi All, When passing parameters to a sheel script, the parameters are referenced by their positions such as $1 for first parameter, $2 for second parameter. these positional values can only have values ranging from $0-$9 (0,1,2,3...9). I have a shell script meant to accept 20 parameters. for... (3 Replies)
Discussion started by: ogologoma
3 Replies

7. Shell Programming and Scripting

Passing a parameter to AWK

Hi All, I am trying to pass a parameter to AWK on my KSH shell prompt as below. var1=2 echo $var1 awk -v var2=${var1} '{print var2}' testfile.txt I am passing the input file (testfile) to awk to get some o/p. It is having 10 records. When I run AWK, it is throwing the following errors... (1 Reply)
Discussion started by: Raamc
1 Replies

8. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

9. Shell Programming and Scripting

Passing parameter more than 9

Hi, I've written a script where eleven parameter to be passed from command line which is inserting into an oracle table, it is working but the tenth and 11th parameter are not accepting as given it is referring to 1st parameter. HERE IS THE SCRIPT #!/bin/ksh #set -o echo $*... (4 Replies)
Discussion started by: sankar
4 Replies

10. Shell Programming and Scripting

Passing parameter through file

Hi , I am passing date parameter through file my shell script testing.sh is #set -x #set -v asd=$1 asd1=$2 echo $asd echo $asd1 Passing parameter as below sh testing.sh `cat file1.txt` Output (2 Replies)
Discussion started by: kaushik02018
2 Replies
RDUP-TR(1)							       rdup								RDUP-TR(1)

NAME
rdup-tr - transform rdup output SYNOPSIS
rdup-tr [OPTION]... DESCRIPTION
Transform rdup output into something else. Where something else can be a tar, cpio, pax archive or another rdup stream. The rdup archive must be given on rdup-tr's standard input. You can select multiple types of output (-O flag), but you must be aware that you may loose some information in formats other than rdup's own, see the table below. You may also supply rdup-tr with only a list of pathnames, this can be selected with the -L flag. The following table shows what happens with the output depending on the input. 0 OK D delete information is lost H hardlink information is lost | | output | tar,cpio,pax | rdup input | | ------------- | ------------- | ------ rdup | D | 0 filelist | DH | H | | OPTIONS
-L Select list input format. Normally rdup-tr accepts rdup output, with this option you can give it a list of path names. Note: with list input rdup-tr will `stat()` each file. -O Output format. This can be 'tar', 'cpio', 'pax' or 'rdup'. It defaults to 'rdup'. -X key Read the encryption key from the file key and encrypt all paths with Blowfish and this key and iv. After the encryption the binary data is converted into ASCII using an URL safe (Section 4 of RFC 3548) version of base64 encode. The encryption key must be on the first line and the key size must be 16 and 8 bytes for the iv, so 24 in total. -Y key Read the decryption key from the file key and decrypt all paths with Blowfish and this key. Before the encryption the paths are con- verted to binary by using an URL safe version of base64 decode. -c Force output to the tty. Normally rdup-tr wants to see it's output redirected. -v Be more verbose. -V Print rdup-tr's version. -h A short help. EXAMPLES
The following is possible rdup -Pgzip -Pmcrypt,-f,KEY,-c /dev/null /home | rdup-tr -O tar -X<(echo secret) | gzip > my-home-zipped-crypted-pathcrypted-tar.gz That is: all files under /home are gzipped and encrypted on a per file basis (first line). Further more, all pathnames are Blowfish encrypted (second line) with the key 'secret'. This is put in a tar file, which is then compressed, resulting in the final output (final line). Creating a compressed and encrypted tar archive out of a full rdup dump might be done as follows rdup -Pgzip -Pmcrypt,-f,KEY,-c /dev/null /home | rdup-tr -O tar > my-home-zipped-and-crypted.tar Or even pack and unpack it on the fly rdup -Pgzip -Pmcrypt,-fKEY,-c /dev/null /home | rdup-tr -Otar | ssh user@remotehost tar xvCf /tmp - Or encryption with openssl rdup -Popenssl,enc,-e,-des-cbc,-k,secret /dev/null /home Or, compressing with gzip, encrypting with openssl and then compressing the entire archive yet again rdup -Pgzip -Popenssl,enc,-e,-des-cbc,-k,secret /dev/null /home | gzip > my_compressed_encrypted_rdup_archive.gz Recreating the original rdup output, which can be fed to rdup-up. gunzip -c my_compressed_encrypted_rdup_archive.gz | rdup-tr -Popenssl,enc,-d,-des-cbc,-k,secret -Pgzip,-d > my_rdup_archive rdup-up < my_rdup_archive -t /tmp/restore Notice the reversal of the -P options. EXIT CODE
rdup-tr return a zero exit code on success, otherwise 1 is returned. AUTHOR
Written by Miek Gieben. REPORTING BUGS
Report bugs to <miek@miek.nl>. SEE ALSO
http:/www.miek.nl/projects/rdup/ is the main site of rdup. Also see rdup(1), rdup-up(1) and rdup-backups(7). COPYRIGHT
Copyright (C) 2005-2010 Miek Gieben. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Licensed under the GPL version 3. See the file LICENSE in the source distribution of rdup. 1.1.11 27 Nov 2008 RDUP-TR(1)
All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy