04-30-2007
Accessing variables of one shell script in another shell script
Hi All,
I have a shell script called sample1.sh where I have 2 variables. Now I have another shell script called sample2.sh. I want the variables in sample1.sh to be available to sample2.sh.
For example. In sample1.sh I am finding the sum of 2 numbers namely a and b. Now I want to access these variables in sample2.sh. Is this possible? How can I do this?
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have one situation. I am developing a shell script to which parameters will be passed from a Web based User Interface using some Business Process(BP).There are some 6 parameters for which user will enter the values in UI. These values will be passed to script by BP in the form -... (2 Replies)
Discussion started by: The Observer
2 Replies
2. Shell Programming and Scripting
I have a variable $exe in a shell script file a.sh which I need to access in another shell script file b.sh. How can I do that? :rolleyes:
Thanks!! (2 Replies)
Discussion started by: looza
2 Replies
3. Shell Programming and Scripting
Hi,
I have a shell script wherein i am doing some file operations and storing the data in some variables. I am exporting these variables as i need to use them outside shell. Then within the shell i am launching GDB session hoping that i will be able to access the exported variables in the GDB... (2 Replies)
Discussion started by: jsantosh
2 Replies
4. Shell Programming and Scripting
I am not able to access the aliases in my environment within a Python script. If I pass the alias to os.system(), I get a message saying "sh: x: not found". I've tried sourcing my .bashrc file in the script, but this does not work. I would perfer not to source my or any rc file because this... (9 Replies)
Discussion started by: cooldude
9 Replies
5. Shell Programming and Scripting
program name--test
#!/bin/bash
output1=`/home/user/a.c`
output2=`/home/user/a.c`
k=`$output1 + 1`
m=`$output2 + 1`
echo $k
echo $m
---------------------------------------------------------------------------
prgram name--a.c
#include<stdio.h>
int main() (1 Reply)
Discussion started by: sameworld1980
1 Replies
6. Shell Programming and Scripting
Hi I'm a newb to php scripts. My task requires me to run a shell script from within the php script which I believe I've figured out. What I'm trying to do now is output something to the web page from the called shell script. when I use "echo" from the called shell script I don't get any output... (3 Replies)
Discussion started by: airon23bball
3 Replies
7. UNIX for Advanced & Expert Users
Hello All,
I was just wondering if there is any direct way to access PL/SQL OUT variables from Korn Shell Script.
I could already figure out how to return a single value back from PL/SQL to Shell Script (using bind variable).
But, what if we want to return multiple values?
One option I... (4 Replies)
Discussion started by: bright_future
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
I was trying to connect secure server using SFTP, but end up in error. Im looking for a shell script which will connect my secured FTP server
For EG:
hostname = example.com
username = fed
password = pass
port = 993
Destination = web
Push some tar file into web folder which is in... (3 Replies)
Discussion started by: Paulwintech
3 Replies
9. UNIX for Dummies Questions & Answers
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
10. Shell Programming and Scripting
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
LEARN ABOUT DEBIAN
seqfmt
SEQFMT(5) User Manuals SEQFMT(5)
NAME
seqfmt - Sequences formats
DESCRIPTION
This document illustrates some common formats used for sequences representation.
EMBL
ID MMVASPHOS standard; RNA; EST; 140 BP.
AC X97897;
DE M.musculus mRNA for protein homologous to
DE vasodilator-stimulated phosphoprotein
SQ Sequence 140 BP; 25 A; 58 C; 39 G; 17 T; 1 other;
ttctcccaga agctgactct atggngaccc cgagagagac tgagcagaac 60
ccccgcaccc ctgcacttcc aatcaggggc gccccgggag cactccccgt 120
ccgccctccg cgcagccatg 140
//
FASTA
>MMVASPHOS
ttctcccagaagctgactctatggngaccccgagagagactgagcagaacctggagccag
ccccgcacccctgcacttccaatcaggggcgccccgggagcactccccgtggcgcgccgc
ccgccctccgcgcagccatg
GCG
!!NA_SEQUENCE 1.0
(No documentation)
dna1.txt Length: 88 Nov 22, 2001 14:38 Type: N Check: 3818 ..
1 TAGTCGTAGT CGGAGCGATG CTGACGATGA CGATGACGAT CGTAGCTGAT
51 CGATCGAGCT GATGCTGATC GAGCTAGCTG ATCGATCG
GDE
#sample1
TTCAAGAGAAACAGCGGCCAAGGAAAAGACTCGGCATGATTGTCCATAGCTTACAAAGCG
#sample2
TTCAAGAGAAACAGCGGCTGGGGGAAAGACTCGTCCTGATTGCCTGTAGATGGTAAAGCG
GENBANK
LOCUS HUMHBV1 130 bp DNA PRI 17-JUN-1993
DEFINITION Human DNA/endogenous Hepatitis B virus (HBV) DNA, left
host viral junction.
ACCESSION M15770
BASE COUNT 32 a 43 c 29 g 26 t
ORIGIN
1 agcgggcagt gcagctgctt ggacagcagg ggtgtttctt caacccaggc
61 ctcctgtcac aacaggccca ttcaattctg aacctgcaag ccaactccaa
121 cctcttttcc cagggggaac caaaaaccct
//
IG
; comment
U03518
AACCTGCGGAAGGATCATTACCGAGTGCGGGTCCTTTGGGCCCAACCTCCCATCCGTGTC
TATTGTACCCTGTTGCTTCGGCGGGCCCGCCGCTTGTCGGCCGCCGGGGGGGCGCCTCTG
TGAGTTGATTGAATGCAATCAGTTAAAACTTTCAACAATGGATCTCTTGGTTCCGGC1
NBRF
>P1;CCHU
cytochrome c [validated] - human
MGDVEKGKKIFIMKCSQCHTVEKGGKHKTGPNLHGLFGRKTGQAPGYSYTAANKNKGIIW
GEDTLMEYLENPKKYIPGTKMIFVGIKKKEERADLIAYLKKATNE*
PIR
ENTRY CCHU #type complete
TITLE cytochrome c [validated] - human
ACCESSIONS A31764; A05676; I55192; A00001
SUMMARY #length 105 #molecular-weight 11749 #checksum 3247
SEQUENCE
5 10 15 20 25 30
1 M G D V E K G K K I F I M K C S Q C H T V E K G G K H K T G
31 P N L H G L F G R K T G Q A P G Y S Y T A A N K N K G I I W
61 G E D T L M E Y L E N P K K Y I P G T K M I F V G I K K K E
91 E R A D L I A Y L K K A T N E
///
RAW
ttctcccagaagctgactctatggngaccccgagagagactgagcagaacctggagccag
ccccgcacccctgcacttccaatcaggggcgccccgggagcactccccgtggcgcgccgc
ccgccctccgcgcagccatg
Warning: This format cannot handle more than one sequence per file.
SWISSPROT
ID 100K_RAT STANDARD; PRT; 149 AA.
AC Q62671;
DE 100 kDa protein (EC 6.3.2.-).
SQ SEQUENCE 149 AA; 17004 MW; D06484B8BC29112E CRC64;
MMSARGDFLN YALSLMRSHN DEHSDVLPVL DVCSLKHVAY VFQALIYWIK
PQLERKRTRE LLELGIDNED SEHENDDDTS QSATLNDKDD ESLPAETGQN
SITIRPPDDQ HLPTANTCIS RLYVPLYSSK QILKQKLLLA IKTKNFGFV
//
SEE ALSO
squizz(1), alifmt(5)
AUTHOR
Nicolas Joly (njoly@pasteur.fr), Institut Pasteur.
Unix 2009-05-19 SEQFMT(5)