11-07-2012
Thank you Guru and Ningy. I can now save and export it.
But how do I use the value of this exported variable from outside of the script.
i.e. when I exit the script and do a echo $CUSTOMER_ID, I do not see '999'.
---------- Post updated at 02:15 AM ---------- Previous update was at 01:57 AM ----------
Well .. now I can use the exported value globally by running script like below
. tool.sh
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to monitor the traffic for few hours but still don't know how to make it possible. I try to set the value of time HH MM SS each into variables but for Hour, there's an error occurred as follow.
typeset -i hour=$(date +%H)
typeset: 09: value too great for base (error token is "09")
... (2 Replies)
Discussion started by: phragix
2 Replies
2. UNIX for Dummies Questions & Answers
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Discussion started by: ParNone
2 Replies
3. Shell Programming and Scripting
How to export variable from one script to other?
Can anybody give me syntax for that?
Thanks (2 Replies)
Discussion started by: navi
2 Replies
4. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
5. Shell Programming and Scripting
How can I assign a variable to an variable. IE $car=honda
One way I can do it is export $car=honda
or
let $car=2323
Is there any other ways to preform this task (3 Replies)
Discussion started by: 3junior
3 Replies
6. Shell Programming and Scripting
Hi
I have a pass a variable from one script to another.
Here are my scripts
Script #1 ./profile
#!/bin/sh
export NAME="Hello"
Script #2 ./test
#!/bin/sh
./profile
echo $NAME
when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Discussion started by: arex876
5 Replies
7. UNIX for Advanced & Expert Users
Hi,
Please find my code below.
ps -xef | grep 14766 | awk 'BEGIN{X="java_home=";X="weblogic_home="}
{for(i=1;i<=NF;i++){if($i ~ /-Dplatform\.home|java$/){split($i,P,"=");s=P?P:$i;print X""s}}}'
echo "java_home="$java_home
echo "weblogic_home="$weblogic_home
Output:
Why does... (3 Replies)
Discussion started by: mohtashims
3 Replies
8. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
9. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
LEARN ABOUT DEBIAN
dailystrips-update
DAILYSTRIPS-UPDATE(1) General Commands Manual DAILYSTRIPS-UPDATE(1)
NAME
dailystrips-update - download updated dailystrips definitions
SYNOPSIS
dailystrips-update [OPTIONS] DAYS
WARNING
This script is intended to use under the assumption that the development version of strips.def is the latest and best. Unfortunately, at
the time of this writing (August, 2007) upstream development seems to have ceased, so using this script will likely result in a more out-
of-date strips definiton than is included in the distribution.
WARNING
Due to the above, as of November 2009, dailystrips-update has been neutered to exit immediately on execution, and it is expected that it
will be removed in a future version of this package.
DESCRIPTION
The dailystrips-update script is provided to automatically retrieve updated strip definitions from a central server, eliminating the need
to manually download and install new versions of the entire program.
It is recommened that the dailystrips-update script be run before each execution of the main dailystrips program. The dailystrips-update
script has provisions to only check for updates if the current file has reached a certain age, which maximizes efficiency and should allow
users to run the update script before each execution of dailystrips without overtaxing the update server.
USAGE
Operation is straightforward. Simply execute dailystrips-update and the updated definitions will be saved to ~/.dailystrips-updates.def,
which will automatically be loaded by the main dailystrips program.
OPTIONS
-q, --quiet
Turn off progress messages
-v, --verbose
Turn on extra progress information, overrides -q
--proxy host:port
Use specified HTTP proxy server (overrides environment proxy, if set)
--proxyauth user:pass
Set username and password for proxy server
--noenvproxy
Ignore the http_proxy environment variable, if set
--retries NUM
When downloading items, make NUM attempts instead of only once
--updates FILE
Save updates to FILE instead of ~/.dailystrips-updates.def
--minage NUM
Skip downloading updates if local file is less than NUM seconds old
-V, --version
Print version number
-h, --help
Show summary of options
SEE ALSO
dailystrips(1)
AUTHOR
This manual page was written by Rene Weber <rene_debmaint@public.e-mail.elvenlord.com>, for the Debian GNU/Linux system (but may be used by
others).
June 25, 2004 DAILYSTRIPS-UPDATE(1)