Sponsored Content
Top Forums Shell Programming and Scripting How we can pass the argument when calling shell script from perl script Post 302609395 by frank_rizzo on Monday 19th of March 2012 08:28:20 PM
Old 03-19-2012
Java

I don't see a reference to $FILE in the script but this should do it.

Code:
system ("ftpscript.sh file.zip");


Code:
#!/bin/bash
HOST='ftp.span.net'
USER='TPP'
PASSWD='TP'
SRCDIR='Splash'
tarball=$1
#FILE='$File.zip'
FILE=${1?file required}
echo $FILE
/usr/bin/ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd $SRCDIR
put $tarball
quit
END_SCRIPT
exit 0

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling a shell script from perl

Hi all, Not sure if this is the right forum to post query regarding perl script. I have a perl script which internally calls a shell script. My problem is that the shell script should be passed command line arguments. I call a shell script from perl using: system("sript.sh"); How do... (3 Replies)
Discussion started by: gurukottur
3 Replies

2. Shell Programming and Scripting

Calling a shell script from a perl script

Hi, I have one shel script which returns some value and I am calling this shell script from a perl script which needs the out put/return value of shell script. But I don't know how to collect the output/return value of the shell script. Can any one give some idea on it? For example: The... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

3. Shell Programming and Scripting

Calling perl script in shell program

How to call a perl script in shell program / shell scripting. PLS HELP ME (2 Replies)
Discussion started by: hravisankar
2 Replies

4. Shell Programming and Scripting

Calling perl subroutine from shell script (sh)

Hi, ive a perl script, where it has a subroutine clear() in it, and i've one shell script which runs in background, from that shell script i wanted to call subroutine which is in perl script, that's perl script is not module, just simple script. Eg: perl script <test> #!... (4 Replies)
Discussion started by: asarunkumar
4 Replies

5. Shell Programming and Scripting

calling a shell script present on another server using perl script.

Hi, I am working on a sever A. I want to write a perl script to execute a shell script persent on the server B. please help me in this. thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies

6. Shell Programming and Scripting

unable to pass value to user prompt from calling shell script

This is my script structure main script calls configure script which needs to be run as a different user and the configure script calls my application installation script. the application instruction script prompts the user for a directory which I need to pass from my main or configure script. ... (4 Replies)
Discussion started by: cmastays
4 Replies

7. Shell Programming and Scripting

Calling perl from shell script

I am calling a perl script from shell script. $ cat mah_appln_bkp_oln.ksh #!/bin/ksh . /udb/home/udbappln/.profile . /udb/home/udbappln/sqllib/db2profile Com=/udb/udbappln/utility/systemscripts/currentUMR perl $Com/backup.pl -d dbname --tsm --purgetsmcopies 21 --purgetsmlogs exit 0 ... (1 Reply)
Discussion started by: ilugopal
1 Replies

8. Shell Programming and Scripting

How to pass command line argument in shell script?

I need to write a shell script, when I run that script I should pass those arguments if not, then script should not run and pass the error message like invalid option - - should pass the argument. and Exit from the script https://www.unix.com/images/misc/progress.gif (1 Reply)
Discussion started by: Nsharma3006
1 Replies

9. UNIX for Dummies Questions & Answers

How to pass command line argument in shell script?

I need to write a shell script, when I run that script I should pass those arguments if not, then script should not run and pass the error message like invalid option - - should pass the argument. and Exit from the script (8 Replies)
Discussion started by: Nsharma3006
8 Replies

10. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies
DEBOOTSTRAP(8)                                                Debian GNU/Linux manual                                               DEBOOTSTRAP(8)

NAME
debootstrap - Bootstrap a basic Debian system SYNOPSIS
debootstrap [OPTION...] SUITE TARGET [MIRROR [SCRIPT]] debootstrap [OPTION...] --second-stage DESCRIPTION
debootstrap bootstraps a basic Debian system of SUITE into TARGET from MIRROR by running SCRIPT. MIRROR can be an http:// URL, a file:/// URL, or an ssh:/// URL. The SUITE may be a release code name (eg, sid, jessie, wheezy) or a symbolic name (eg, unstable, testing, stable, oldstable) Notice that file:/ URLs are translated to file:/// (correct scheme as described in RFC1738 for local filenames), and file:// will not work. ssh://USER@HOST/PATH URLs are retrieved using scp; use of ssh-agent or similar is strongly recommended. Debootstrap can be used to install Debian in a system without using an installation disk but can also be used to run a different Debian flavor in a chroot environment. This way you can create a full (minimal) Debian installation which can be used for testing purposes (see the EXAMPLES section). If you are looking for a chroot system to build packages please take a look at pbuilder. OPTIONS
--arch=ARCH Set the target architecture (use if dpkg isn't installed). See also --foreign. --include=alpha,beta Comma separated list of packages which will be added to download and extract lists. --exclude=alpha,beta Comma separated list of packages which will be removed from download and extract lists. WARNING: you can and probably will exclude essential packages, be careful using this option. --components=alpha,beta Use packages from the listed components of the archive. --no-resolve-deps By default, debootstrap will attempt to automatically resolve any missing dependencies, warning if any are found. Note that this is not a complete dependency resolve in the sense of dpkg or apt, and that it is far better to specify the entire base system than rely on this option. With this option set, this behaviour is disabled. --variant=minbase|buildd|fakechroot|scratchbox Name of the bootstrap script variant to use. Currently, the variants supported are minbase, which only includes essential packages and apt; buildd, which installs the build-essential packages into TARGET; and fakechroot, which installs the packages without root privileges. Finally there is variant scratchbox, which is for creating targets for scratchbox usage. The default, with no --vari- ant=X argument, is to create a base Debian installation in TARGET. --keyring=KEYRING Override the default keyring for the distribution being bootstrapped, and use KEYRING to check signatures of retrieved Release files. --no-check-gpg Disables checking gpg signatures of retrieved Release files. --verbose Produce more info about downloading. --print-debs Print the packages to be installed, and exit. Note that a TARGET directory must be specified so debootstrap can download Packages files to determine which packages should be installed, and to resolve dependencies. The TARGET directory will be deleted unless --keep-debootstrap-dir is specified. --download-only Download packages, but don't perform installation. --foreign Do the initial unpack phase of bootstrapping only, for example if the target architecture does not match the host architecture. A copy of debootstrap sufficient for completing the bootstrap process will be installed as /debootstrap/debootstrap in the target filesystem. You can run it with the --second-stage option to complete the bootstrapping process. --second-stage Complete the bootstrapping process. Other arguments are generally not needed. --second-stage-target=DIR Run second stage in a subdirectory instead of root. (can be used to create a foreign chroot) (requires --second-stage) --keep-debootstrap-dir Don't delete the /debootstrap directory in the target after completing the installation. --unpack-tarball=FILE Acquire .debs from tarball FILE instead of downloading via http. --make-tarball=FILE Instead of bootstrapping, make a tarball (written to FILE) of the downloaded packages. The resulting tarball may be passed to a later --unpack-tarball. --debian-installer Used for internal purposes by the debian-installer --extractor=TYPE Override automatic .deb extractor selection to TYPE. Supported extractors are: dpkg-deb and ar. --no-check-certificate Do not check certificate against certificate authorities --certificate=FILE Use the client certificate stored in file (PEM) --private-key=FILE Read the private key from file EXAMPLES
To setup a wheezy system: debootstrap wheezy ./wheezy-chroot http://ftp.us.debian.org/debian debootstrap wheezy ./wheezy-chroot file:///LOCAL_MIRROR/debian Full process to create a complete Debian installation of sid (unstable) in a chroot: main # debootstrap sid sid-root http://ftp.us.debian.org/debian/ [ ... watch it download the whole system ] main # echo "proc sid-root/proc proc defaults 0 0" >> /etc/fstab main # mount proc sid-root/proc -t proc main # echo "sysfs sid-root/sys sysfs defaults 0 0" >> /etc/fstab main # mount sysfs sid-root/sys -t sysfs main # cp /etc/hosts sid-root/etc/hosts main # chroot sid-root /bin/bash AUTHOR
debootstrap was written by Anthony Towns <ajt@debian.org>. This manpage was written by Matt Kraai <kraai@debian.org>. Debian Project 2001-04-27 DEBOOTSTRAP(8)
All times are GMT -4. The time now is 04:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy