Score:0

how to export VAriable from bash script, not calling the other one

co flag

I have inside my script = 1.sh: A=1, export A I made the 1.sh = 755

I know if I run: . ./1.sh

then if from command line I will run echo $A it will return 1

so in that case I should have 2 files file1 with VARs, that can be run with . ./file1

then the file 2 with commands

how I can get the VALUEs of VARs, if I have the VARs and commands in 1 file ?

FedKad avatar
cn flag
Your question is not clear. Please [edit] and expand the last part of your question.
CatMan avatar
fr flag
Just the as on the command line, e.g. "B=$A" and the next line with "echo $B" gives the output when running ". ./2.sh". If that does not help you please rephrase your question giving the full text of the files and write what output you like to see
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.