Sponsored Content
Top Forums Shell Programming and Scripting Using a script to define variables and run multiple other scripts in succession. Post 302808327 by Corona688 on Thursday 16th of May 2013 12:40:32 PM
Old 05-16-2013
Why not export these variables instead of modifying files all the time?

Code:
$ export VAR=value
# The 'VAR' variable will now be automatically available in any script you call

$ ./script1
$ ./script2
$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

1 script or multiple scripts?? - check files, run jobs

Question for anyone that might be able to help: My objective is to eheck if a file (a source file) exists in a directory. If it does then, I'd like to call an application (Informatica ETL file...not necessary to know) to run a program which extracts data and loads it into multiple targets. ... (6 Replies)
Discussion started by: jnanasakti
6 Replies

2. UNIX for Dummies Questions & Answers

Sh script to run multiple php scripts

I wrote a .sh script to run 5 php scripts. The problem is that it's running 1 then 2 then 3 in that order .... I want it to execute all 5 at ONCE.... nohup php /home/script1/script1.php && nohup php /home/script2/script2.php && nohup php /home/script3/script3.php && nohup php... (1 Reply)
Discussion started by: holyearth
1 Replies

3. Shell Programming and Scripting

Executing several bash scripts in succession

Hi, I am new to shell programming. I am trying to automate setting up a network using several scripts. Some of the scripts require to reboot in order to continue with the setup. Is it possible to enter another script as soon as the system reboots. Also, if the last line of the script is bash... (7 Replies)
Discussion started by: fantasyland
7 Replies

4. UNIX for Advanced & Expert Users

How to make the variables of one script available for the other scripts?

Hello Everyone, I want to know how can we make the variables of one script available for the other script? for example i have three scripts variable_availability.sh,first.sh,second.sh and a file containing variables called common ---------------------------------- cat variable_availability.sh... (2 Replies)
Discussion started by: Kesavan
2 Replies

5. UNIX for Dummies Questions & Answers

Define variables with UNIX script

oopps! I Meant "Define Variables within a UNIX Script" What would be the best way to define a variable in a unix shell script so anyone who views this script doesn't know what value is assigned to that variable. some other location... a="/usr/lib/fileA" Unix script... sed... (5 Replies)
Discussion started by: macastor
5 Replies

6. Shell Programming and Scripting

Loop to define variables in KSH

Hi, I am trying to use a database to store configurations in an environment definition scripts to make the configurations easily modifiable. (long story short - it is an easier process to make changes in the db than trying to deploy a file). The values will be stored in the database in the... (1 Reply)
Discussion started by: gbala
1 Replies

7. Shell Programming and Scripting

Running a script with multiple variables like 25 variables.

Hi All, i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way?? #!/bin/ksh ##script is sample.ksh age=$1 gender=$2 class=$3 . . .... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies

8. Shell Programming and Scripting

Define Variables

Hi, I just define the variable in script and use those script in another script but the variable not recognize. test1.sh #!/bin/bash DB="test_db" USR="test_user" PWD="test_pwd" HST="24.254.87.12" test2.sh #!/bin/bash ./test1.sh mysql -u $USR -p $PWD -h $HST... (2 Replies)
Discussion started by: fspalero
2 Replies

9. UNIX for Beginners Questions & Answers

A single script to run multiple scripts

Hi , Can someone help! I need a shell script to run multiple scripts by using single shell script, incase any one of the scripts fails, it should get exit and after trouble shooting if we re-execute it, it should start from the failed script. I have a written a scripting till the... (1 Reply)
Discussion started by: anniesurolyn
1 Replies

10. UNIX for Beginners Questions & Answers

To run multiple scripts

Hi , Can someone help! I need a shell script to run multiple scripts by using single shell script, incase any one of the scripts fails, it should get exit and after trouble shooting if we re-execute it, it should start from the failed script (4 Replies)
Discussion started by: anniesurolyn
4 Replies
OCTAVE-CONFIG(1)					      General Commands Manual						  OCTAVE-CONFIG(1)

NAME
octave-config - GNU Octave component and library information retrieval SYNOPSIS
octave-config [OPTION]... DESCRIPTION
octave-config is a tool to obtain directory information for .oct and .m files for octave(1). OPTIONS
--m-site-dir Display the main directory for local, or site-specific, .m script files. --oct-site-dir Display the main directory for local, or site-specific, .oct dynamic-link libraries. -p VAR, --print VAR Print the default value of the Octave configuration variable VAR. Recognized variables are: API_VERSION LOCALAPIOCTFILEDIR ARCHLIBDIR LOCALARCHLIBDIR BINDIR LOCALFCNFILEDIR CANONICAL_HOST_TYPE LOCALOCTFILEDIR DATADIR LOCALSTARTUPFILEDIR DATAROOTDIR LOCALVERARCHLIBDIR DEFAULT_PAGER LOCALVERFCNFILEDIR EXEC_PREFIX LOCALVEROCTFILEDIR FCNFILEDIR MAN1DIR IMAGEDIR MAN1EXT INCLUDEDIR MANDIR INFODIR OCTFILEDIR INFOFILE OCTINCLUDEDIR LIBDIR OCTLIBDIR LIBEXECDIR PREFIX LOCALAPIARCHLIBDIR STARTUPFILEDIR LOCALAPIFCNFILEDIR VERSION -v, --version Display the version number of octave(1). -h, -?, --help Print help message. AUTHOR
John W. Eaton <jwe@octave.org> This manual page was contributed by Dirk Eddelbuettel <edd@debian.org> for the Debian GNU/Linux distribution but may be used by others. GNU Octave 4 February 2011 OCTAVE-CONFIG(1)
All times are GMT -4. The time now is 02:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy