10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Linux Redhat, BASH Shell.
I want to put this in my .bash_profile
I have log files that go to directory paths based in part on other variables such as went DB Name is set in memory. So if the DB Name changes the path to the log file changes. How do I create an environment variable I put into... (6 Replies)
Discussion started by: guessingo
6 Replies
2. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
3. Shell Programming and Scripting
Hi all,
I am fairly new to unix scripting and will like to know how to dynamically set the name of an environment variable to be used.
We have a .env file where we defined the names and locations of data files, trigger files, directories .... etc
Example of variables defined in .env... (4 Replies)
Discussion started by: Morelia
4 Replies
4. Shell Programming and Scripting
Hi,
I need to generate the text name dynamically in for loop,
ex,
VAR_COPY_FILE1= file path 1
VAR_COPY_FILE2= file path 2
VAR_COPY_FILE3= file path 3
for i in 1 2 3
do
if
then
"do some process here"
fi
done (3 Replies)
Discussion started by: msubash26
3 Replies
5. Shell Programming and Scripting
Hello,
This is not homework. It is a question that I received on a recent interview for a linux position. Can someone shed some light on the right answer? I got it wrong.
Thanks,
jaysunn (3 Replies)
Discussion started by: jaysunn
3 Replies
6. Shell Programming and Scripting
I can't seem to make what appears to be a simple substitution.
I want to define a list of systems for which daily reports need to be filed
systems="systemA systemC systemZ"
I then want to run a loop
for i in ${systems}
Analyze statistics
Create the reports
mailx (8 Replies)
Discussion started by: mugsymark
8 Replies
7. Shell Programming and Scripting
Hi!
I need to determin the most efficient way to do something (rather simple, I thought).
I'm currently echo(ing) a series of menu options, and reading the command input as the number associated with the entry. What I need to do is when the option 1 is selected, that it references a list and... (18 Replies)
Discussion started by: cchaloux
18 Replies
8. Shell Programming and Scripting
Hi all,
How can I use sed to perform a substitution if the string that I'm going to substitute is stored in a variable:
Let's say:
sed 's/abcdefg/good'
VS
tmp="abcdefg"
sed 's/$tmp/good'
The second case doesn't work. Guess it's due to the single quotes on the outside. How can I... (1 Reply)
Discussion started by: rockysfr
1 Replies
9. UNIX for Dummies Questions & Answers
Hi friends how can we read array elements dynamically in bash shell? (1 Reply)
Discussion started by: haisubbu
1 Replies
10. Shell Programming and Scripting
Hi !
I have the following situation -
##First variable
variableA=JOB_A
##bunch of other variable
JOB_A_RESTART=cleanupJobA
JOB_B_RESTART=cleanupJobB
JOB_C_RESTART=cleanupJobC
now i need a script which would -
1. take the first variable
2. create a new variable name... (2 Replies)
Discussion started by: hsahay
2 Replies