0

a. Have a scenario where in have some environment variables and other alias set.

b. But I wanted to store that info in a different string and whenever the user calls the particular alias, it needs to print all the string store in that variable, like HELP function.

c. I was trying like,

printinfo_var = "
  This is line 1.
  This is line 2.
  This is line 3.
"

alias printinfo 'echo $printinfo_var' 

Query: 1. But I am unable to proceed with the same when I tried in CSHELL Script. 2. Which is the best scripting methodology that I can use to set and print environment variables??

Share in your comments !

MemReflect
  • 551
  • 2
  • 10
Vimo
  • 1,061
  • 3
  • 12
  • 22
  • 1
    This question is almost certainly mistagged: [tag:rc-shell] is a completely different shell from [tag:csh] -- and the latter is the shell known as "C shell". (`rc` is much better designed than `csh`, but [that's an astonishingly low bar](http://www.grymoire.com/unix/CshTop10.txt)). And what does [tag:python] have to do with the question at all? – Charles Duffy Sep 17 '18 at 21:57
  • @CharlesDuffy: My Query2 was asking which script is best for setting up the bash/environment variables in the linux and I use python as well for other scripting purpose.. So added that tag as well to see if anyone can respond from that front ! – Vimo Sep 17 '18 at 22:16
  • One question to a question -- anything else is eligible for close as "too broad". If you want to configure *bash* variables, the only shell appropriate for the job is bash -- not csh, or rc, or anything else. (For *environment* variables it's possible to use a non-bash shell, but adds a bunch of complexity to the startup sequence). – Charles Duffy Sep 17 '18 at 23:00

0 Answers0