10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
Thanks for reviewing my question.
I have a sh script where I used an environmental variable for the directory for the file I need to check to ensure before executing a process.
I have confirmed the permissions and I can find the file if I use a hard coding of the directory. This is a... (5 Replies)
Discussion started by: rstojkovic68
5 Replies
2. Shell Programming and Scripting
Hi everyone,
I wrote a script that is supposed to be run by cron on a daily basis. It works just fine if I run it manually, but due to a lack of environment variables (which are available during my user session but not when cron runs the script) it keeps failing to run successfully.
Here's the... (2 Replies)
Discussion started by: gacanepa
2 Replies
3. Shell Programming and Scripting
I have tried with the following:
csh -c 'source ~/.cshrc; exec bash' # works perfectly
(cat ~/.cshrc; echo exec bash) | csh # not working
And, using sed, I successfully retrieved the environment variables from ~/.cshrc
sed -rn 's/setenv\s+(\S+)\s+(.*)$/export \1=\2/p' ~/.cshrc
but now... (6 Replies)
Discussion started by: royalibrahim
6 Replies
4. Shell Programming and Scripting
Hi,
I meet an problem that it cannot change Terminal environment variable in a perl or bash script.
This change can only exist and become effective in script lifetime.
But I want to make this change take effect in current opened Terminal.
In our view, the thought seems to be impossible,
As... (9 Replies)
Discussion started by: weichanghe2000
9 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a a bash script and i am exporting a variable in it.
I am calling a csh script from this bash script.
The variable "ABC" will be visible in csh script.
ks.bash
export ABC = abc
./kp.csh
ab.csh
echo $ABC
setenv ABC =cde (i want to assign this value to ABC only if... (4 Replies)
Discussion started by: vdhingra123
4 Replies
6. Shell Programming and Scripting
Hi All,
I am using ETL tool Datastage and is installed on Linux environment. Few environment variables are set in datastage. Now my requirement is to use those environment variables in a unix script.
Is there any option I can do it?
Sugeestions from people working on datastage and linux... (1 Reply)
Discussion started by: bghosh
1 Replies
7. Shell Programming and Scripting
Hello Everyone
I need to create a script file which must append some lines to a target text file, I'm using sed for windows, the script file look like this:
{
a\
STRINGTABLE DISCARDABLE\
BEGIN\
5, 150 {a\
#define RC_SHELL, "%ID_SHELL%"\
#define RC_NAME, "%ID_NAME%"\
END
}
... (1 Reply)
Discussion started by: edgarvm
1 Replies
8. Emergency UNIX and Linux Support
Hi all!
I know that environment variables can be set on the .bashrc file, but I need to set them from a sh script. I saw a lot of websites that teach this but it doesn't work for me.
#!/bin/sh
DEKTOP=$DESKTOP=:/home/rrodrigues/Desktop
export DESKTOP
if I do echo $DESKTOP returns me... (10 Replies)
Discussion started by: ruben.rodrigues
10 Replies
9. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Write a shell program called myenv which takes one argument. The argument should be the name of an environment variable, such as PATH HOME etc. myenv should print out the value of the variable given as the argument. If no argument is... (1 Reply)
Discussion started by: Helix
1 Replies
10. UNIX for Dummies Questions & Answers
this is my first post so Hello,
here is my question
@top level Makefile should not set values for
environment variables FC, CC, FFLAGS (etc) but
use the ones that mpi_make sets.
So as you can see i have to run an mpi program, in fortran and i am supposed to do the above.the program was... (3 Replies)
Discussion started by: Kwstas
3 Replies