Doubts about variables


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Doubts about variables
# 1  
Old 12-01-2009
Doubts about variables

Hi,
If I have a variable in a configuration file like this:

Code:
BTS=53,1-2-3-6
export BTS

As might get each of the variables in this parameter?

"53"
"1"
"2"
....
# 2  
Old 12-01-2009
From your script you can source the config file like this:

Code:
. configfile
echo $BTS

# 3  
Old 12-01-2009
Hi,
That's not what I wanted.
Once you recover the variable with:

Code:
. configfile
echo $BTS


How can I save each of the data variables.
a = 53
b = 1
c = 2
...
# 4  
Old 12-01-2009
Whenever I see a post like this i am reminded: -

Code:
The secret of good programming is not in writing clever code but sensible data structures.

Goodnight
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. HP-UX

Some doubts about resizing fs's in HP-UX

Hello, I'm new to HP-UX and I'm not sure about some concepts related to resizing fs's under this OS. First of all I'm only asking about resizing ONLINE, it means, without having to umount the fs nor rebooting, etc. Q1. I've read that in order to resize a fs online there are 2 requirements:... (3 Replies)
Discussion started by: asanchez
3 Replies

2. AIX

doubts on xcomd

Hi , How to check if a daemon process is running or not ? is the lssrc command the right option ? I want to check if xcomd daemon is running or not ? lssrc -a | grep xcomd is of no use. Though I am able to sense that xcomd is running there is no output from lssrc command. Do I... (2 Replies)
Discussion started by: BalajiUthira
2 Replies

3. AIX

Doubts on SMIT

Hi All, Have a few doubts on SMIT. 1. Is SMIT available in seperate packages if it is not installed by default with the AIX ? 2. how to check the smit version.. is there anything of that kind ? 3. what is the effect of smit.cat file ? 4. What are all the files present in /etc/objrepos/... (4 Replies)
Discussion started by: BalajiUthira
4 Replies

4. UNIX for Dummies Questions & Answers

Unix doubts

Hi All, 1. how and who calls .profile when you login 2. what is PPID and what means by PPID = 0 Thanks in Advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

5. UNIX for Dummies Questions & Answers

Doubts on FIFO

Hi , I m beginner for Unix and i want to use FIFO in my 2 Scripts . I want 1 script to read data from FIFO and other will write into FIFO. Despite reading so many articles/posts i am still unable sunchronize my scripts. My doubts are 1> Do We require both scripts as daemons to use... (0 Replies)
Discussion started by: Akshay
0 Replies

6. Shell Programming and Scripting

doubts in crontab

Hi All, I am tring to set a shedule for cron to execute my script in every 15 min, n want a mail alert on my mail id if cron fails to get data as input for my script, how can i set that? Thanks in advance Subin (1 Reply)
Discussion started by: subin_bala
1 Replies

7. UNIX for Dummies Questions & Answers

unix doubts

Write unix command to list or view auto links (0 Replies)
Discussion started by: ashishshah.engg
0 Replies

8. UNIX for Dummies Questions & Answers

Unix doubts

Hello All, I am very new to UNIX. Please help me to find answers of below questions. 1.A script is saved with name ls. When we execute the script what it will execute? a) Will execute ls command b) Will execute the script c) Will execute script or command depends on the path ... (2 Replies)
Discussion started by: aswathy
2 Replies

9. Shell Programming and Scripting

doubts reg inodes

Dear all, We have a logfile which is written into by a background process running continuously. This logfile size keeps increasing rapidly. While trying to manipulate the file, we deleted the file from the directory. But the process kept on writing into the file and the directory space got filled... (4 Replies)
Discussion started by: ranj@chn
4 Replies
Login or Register to Ask a Question