Sponsored Content
Top Forums Shell Programming and Scripting Explaination on export command Post 302929109 by chandana.hs on Thursday 18th of December 2014 12:37:11 AM
Old 12-18-2014
Linux Explaination on export command

Hello Team,

Could you pls explain how export command works in below code:

Code:
for i in ${!SDV_*}; do
        export $i
    done

As per my understanding, if
Code:
SDV_1=test1;SDV_2=test2;test1=var1;test2=var2

then in for loop below export will get executed.
Code:
export var1;export var2

But, Will this actually work like normal export command below?
Code:
export SDV_1=test1;
export test1=var1

Could you explain and correct me if wrong.

also i tried below and did not get the values in the new sessions.

On Same session:
Code:
$ var1=test1;
$ export var1;
$ echo $var1
test1
$ export var2;
$ var2=test2;
$ echo $var2
test2
$

On new session:
Code:
$ echo $var1

$ echo $var2

$

Regards,
Chandana

Last edited by chandana.hs; 12-18-2014 at 01:39 AM.. Reason: had missed a line of code
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

export command

Is there any difference between these 2 commands :- export var="a" and var="a" export var (2 Replies)
Discussion started by: radhika03
2 Replies

2. Linux

I would like to know the explaination.

Hi, I'm new to LINUX Scripting, I would like to know the full explaination of the below scripts. thank you. 1st script #! /bin/sh . /opt/home/hssadmin/cindy/formatxml.env `testrecord.scp` `testEXGU.scp` 2nd Script #! /bin/sh . /opt/home/hssadmin/cindy/formatxml.env cd... (1 Reply)
Discussion started by: AudreyEliza
1 Replies

3. UNIX for Advanced & Expert Users

Export command

Hi all, Want to know what does export command do?? What is its functionality? And on a shell prompt $at=1 $ echo $at 1 The variable above is it available to other script??? (3 Replies)
Discussion started by: prakash.kudreka
3 Replies

4. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

5. Shell Programming and Scripting

Looking for awk code explaination

{ # print NF,NR,$0; if ( ($(NF-1) != 0) && ($NF != 0) ) {if ($(NF-1) > $NF) {percent=$(NF-1)/$NF-1;} else {percent=$NF/$(NF-1)-1;} } printf "%8.4f\%\n",percent*100; if (percent > 0.05||percent < -0.05 ){exit 1;} }' Use code tags please, ty. Also try to use a more... (1 Reply)
Discussion started by: bosmat shani
1 Replies

6. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

7. Programming

Need explaination for a function please

can anybody explain a long fpathconf(int fildes, int name); what it do like 1- lim = fpathconf(STDIN_FILENO, _PC_NAME_MAX); printf("%s %ld\n", "_PC_NAME_MAX: ", lim); 2- lim = fpathconf(STDIN_FILENO, _PC_PATH_MAX); printf("%s %ld\n", " _PC_PATH_MAX ", lim); 3- lim =... (1 Reply)
Discussion started by: fwrlfo
1 Replies

8. Shell Programming and Scripting

Explaination on Behavior of awk command

Hello Admin, Could you pls explain on the below behavior of the awk command. $ awk -F">20" "/Cyclomatic complexity/ && /;add;/{print \$1}" inspect_64d_369980 | awk '{print $NF}' | sort | tail -1 65 $var=`awk -F">20" "/Cyclomatic complexity/ && /;add;/{print \$1}" inspect_64d_369980 | awk... (3 Replies)
Discussion started by: chandana hs
3 Replies

9. Shell Programming and Scripting

Explaination on if true

Hi Team, I need to know why ppl use If true loop instead of just writing down the sequence of code lines. 1: echo "Line1" if true; then echo "Line2" fi echo "Line3" 2: echo "Line1" echo "Line2" echo "Line3" Could you explain what does the if true loop make difference in 1st compare... (3 Replies)
Discussion started by: chandana hs
3 Replies
doctools::html::cssdefaults(n)					Documentation tools				    doctools::html::cssdefaults(n)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::html::cssdefaults - Default CSS style for HTML export plugins SYNOPSIS
package require Tcl 8.4 package require doctools::html::cssdefaults ?0.1? ::doctools::html::cssdefaults::contents _________________________________________________________________ DESCRIPTION
This package provides a single command providing access to the text of the default CSS style to use for HTML markup generated by the vari- ous HTML export plugins. This is an internal package of doctools, for use by export plugins, i.e. the packages converting doctools related documented into other formats, most notably HTML. API
::doctools::html::cssdefaults::contents This command returns the text of the default CSS style to use for HTML markup generated by the various HTML export plugins. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
CSS, HTML, doctools, export, plugin, style CATEGORY
Documentation tools COPYRIGHT
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools2base 0.1 doctools::html::cssdefaults(n)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy