Help - Setting variables equal to data from another file
Relatively new poster but long time reader. I tried searching all threads for similar situations with mine but I've had no luck with some of the solutions.
I have a script (script.ksh) that is getting information from an Oracle DB and spooling it into a text file (log.txt). I would then like to assign the information from log.txt to variables in the script.ksh
Example...
script.ksh
This is creating log.txt - which contains the following...
Now this is where I'm getting lost. When I want to save the info from log.txt to variables in script.ksh - I'm getting empty fields
This is how I'm doing it in script.ksh...
When I echo out each variable - I get blanks. Any Ideas? I'm assuming I'm doing something wrong with the "tail" - I don't think I even need it... just the way someone suggested for me to do it but I believe it isn't the correct method.
The goal is to get WF_NAME = test_name, FDR_NAME = test_folder, etc. so I can pass these as parameters to a different script.
Probably something dumb but I can't seem to figure it out. Thanks in advance for the help.
greetings all, I have a task right now that is somewhat stumping me, and I am not sure what the best approach is to take it.
I have a text file that will contain something similar to the following:
first1, other1
first2, other2
first3, other3
first4, other4
I have to generate an... (14 Replies)
Hi,
I have around 10 environment variables in my shell script. i want to set this all in a file and just call that file in my shell script. How can i do that ? Please help. TIA! (6 Replies)
Hi,
In Cron file i'm using username and password hard-coded and now i wann to use environmental veraiables in cron file.
But Could you please guide me how to use these environmental variables in cron file ?
Thanks,
Shyamu.A (4 Replies)
Hi
Does anyone know how to set any character as the field separator with awk/nawk on a solaris 10 box. I have tried using /./ regex but this doesnt work either and im out of ideas.
thanks (7 Replies)
Hello, I need a little help.
1. Edit /etc/profile so that all users are greeted upon login.
2. For the root account, set the prompt to something like "Danger!! root is doing stuff in \w", preferably in a bright color such as red or pink or in reverse video mode.
Thanks for help. (4 Replies)
Hi,
I need a simple csh script to read a file containing data like this
Buy Transactions : 175
Sell Transactions : 212
Server: sepo2
i want to read both field and its value and assign variables to each.. (2 Replies)
normally when i type:
condor_q | tail -1
command line returns:
0 jobs; 0 idle, 0 running, 0 held
I want use the number in front of 'running' in a series of equality tests to submit more jobs when my queue gets low. Someone showed me how to do it a few days ago by setting an array equal to... (4 Replies)
Hi all,
I have a shell script that sets up the environment for an application running on UNIX - ksh. This script is run using:
. ./script_name XX
where XX is a parameter. I want to run it from another shell script but when I do it I don't get the envornment variables set up and the prompt... (3 Replies)
i have a file .NAMEexport MY_NAME=JOE
when i do this at the command prompt #. .NAME
$echo MY_NAME
$JOEi created a script called Run.sh . .NAME At the command prompt i did #sh Run.sh
#echo $MY_NAMEit returns nothing. What have i missed out? (7 Replies)
Hello all! After searching through numerous helpful posts on these forums I am still having an issue with a task I am trying to accomplish.
I am trying to take data from an input file, store the contents as variables, and use the variables in the script.
The input file (input.txt) is... (2 Replies)