Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to import a variable Used in Another Korn Shell Script? Post 302845887 by Ajesh on Friday 23rd of August 2013 08:26:21 AM
Old 08-23-2013
Quote:
Originally Posted by vbe
Not very clear...

What is stopping you to add those two lines at the beginning of your second script? (are you using other variables/function found elsewhere? in first script?)
Well i have tried using "export" from the first script and "import" into the another but the values do not come


In the First Script

Code:
export TZ=EST5EDT

JS_ST=$(date +"%k%M")
export JS_ST
echo "The Launch Time now is $JS_ST"


And in the second script

Code:
export TZ=EST5EDT
import JS_ST
echo "The Job Stream Launch Time is $JS_ST"

But the Value JS_ST is not coming

---------- Post updated 08-23-13 at 04:26 AM ---------- Previous update was 08-22-13 at 09:34 AM ----------

So Finally i had to export the variable to a File and then i read it from the File.

Quite surprised, Shell scripting doesnt have export/import function.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding Occurence of comma in a Variable ( KORN Shell)

All I want to find the occurence of comma in a variable in KORN shell. For example : var = test,test2,test3 .... finding occurence of comma in this variable. Result = 3 now. Please help me to write the code. Thanks in advance. Regards Deepak (2 Replies)
Discussion started by: DeepakXavier
2 Replies

2. Shell Programming and Scripting

compound variable in korn shell

in a text " Korn Shell Unix programming Manual 3° Edition" i have found this sintax to declare a compoud variable: variable=( fild1 (0 Replies)
Discussion started by: ZINGARO
0 Replies

3. Shell Programming and Scripting

compound variable in korn shell

in a text " Korn Shell Unix programming Manual 3° Edition" i have found this sintax to declare a compoud variable: variable=( fild1 fild1 ) but this sintax in ksh and sh (HP-UNIX) not work... why?? exist another solution for this type of variable ??? (5 Replies)
Discussion started by: ZINGARO
5 Replies

4. Shell Programming and Scripting

Korn Shell Variable values difference

I am using two shell scripts a.ksh and b.ksh a.ksh 1. Sets the value +++++++++++++++++ export USER1=abcd1 export PASSWORD=xyz +++++++++++++++++ b.ksh 2. Second scripts calls sctipt a.ksh and uses the values set in a.ksh and pass to an executable demo... (2 Replies)
Discussion started by: kunalseth
2 Replies

5. Shell Programming and Scripting

Setting variable for query using iSql / Korn Shell

Hi All- First time using iSql. I have 4 query files - some have more than 1 line of sql statements After a bit of research it appears I can just use the -i command and specify the input file. Questions: Does it matter that there are multiple queries in each file? Do I need to have... (3 Replies)
Discussion started by: Cailet
3 Replies

6. Shell Programming and Scripting

Korn Shell Script

I have to solve some exercises in Korn Shell, but i'm having some problems. For example: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. I... (3 Replies)
Discussion started by: burm
3 Replies

7. Shell Programming and Scripting

Shell script for an db import process

Hello, I would like a to have an script that would accept variables for "foruser" and "touser" during an db import.. I am pasting an sample script below... The "and" in the below script needs to changed..to a correct syntax for i in `cat /tmp/from` and for j in `cat /tmp/to` do {... (2 Replies)
Discussion started by: jjoy
2 Replies

8. Programming

How to refer to variable (korn shell)?

Hi I have the following block of code in korn shell and don't now how to refer to variable `print variable1.$dvd` ? --- integer dvd=4 integer number=0 while (( dvd!=0 )) do print "Iteracja numer : $dvd" print "$_" #it refers to $dvd var but want to refer... (3 Replies)
Discussion started by: presul
3 Replies

9. Shell Programming and Scripting

korn shell: check the content of a string of a variable

hello, i have a variable which should have following content : var="value1" or var="value2" or var="value2:*" # example: value2:22 how can i check : - if the content is ok (value1 / value2* ) - the two options of "value2" when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies

10. Shell Programming and Scripting

Korn Shell help - Using parameter to create variable names

I'm using korn shell and I am wondering if it's possible to use a parameter passed into a function to build a variable name in a configuration file. I have the function in one source file, I'd like to have a global configuration file instead of hardcoding logins to each script. So I have a... (7 Replies)
Discussion started by: mrevello
7 Replies
GCSTAR(1)							Linux User's Manual							 GCSTAR(1)

NAME
GCstar - Personal collection manager SYNOPSIS
gcstar [-u UPDATE-OPTIONS] [-x EXECUTE-OPTIONS] [FILENAME] DESCRIPTION
GCstar is a Gtk2 program used to manage personal collections. OPTIONS
Without any option, it will open FILENAME if specified or the previously opened file. There are also two groups of options. UPDATE-OPTIONS -u, --update Tell GCstar to look for available updates -a, --all Update all components -c, --collection Update collection models -w, --website Update plugins to download information -i, --import Update plugins to import data -e, --export Update plugins to export data -l, --lang Update translations -n, --noproxy Don't ask for a proxy EXECUTE-OPTIONS -x, --execute Enter non-interactive mode -c, --collection MODEL Specify the collection type -w, --website PLUGIN Specify the plugin to use to download information -i, --import PLUGIN Specify the plugin to use to import a collection -e, --export PLUGIN Specify the plugin to use to export the collection -f, --fields FILENAME File containing fields list to use for import/export -o, --output FILENAME Write output in FILENAME instead of standard output --download TITLE Search for the item with TITLE as name --importprefs PREFERENCES Preferences for the import plugin --exportprefs PREFERENCES Preferences for the export plugin Preferences for import/export plugins are specified using this schema Key1=>Value1,Key2=>Value2 ENVIRONMENT
HOME Used to define following variables if needed XDG_CONFIG_HOME Where configuration files should be stored. If not defined: $HOME/.config XDG_DATA_HOME Where some data will be stored. If not defined: $HOME/.local/share BUGS REPORTING
To report bugs, please use this forum: http://forums.gcstar.org/viewforum.php?id=4 AUTHORS
Tian <tian@c-sait.net> http://www.gcstar.org/ GCstar 17 August 2006 GCSTAR(1)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy