![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do I pass or read values from file ? | nix-kid | Shell Programming and Scripting | 1 | 05-20-2008 10:04 AM |
| read from a file and calculate values for a specified field | lucho_1 | Shell Programming and Scripting | 3 | 03-11-2008 04:24 PM |
| Read the csv file and assign the values in to variable | rajbal | Shell Programming and Scripting | 9 | 09-28-2006 04:49 PM |
| Korn Shell Script - Read File & Search On Values | run_unx_novice | Shell Programming and Scripting | 2 | 06-15-2005 04:20 AM |
| Read data from a file into a variable | yorkdg | Shell Programming and Scripting | 2 | 12-09-2004 02:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How can I read variable values from file?
Hi,
I want to pratmeterze my scripts like, my confRsync file contains varibale values for 1. host 2. Destination and 3. source like this, I want to read this values from this and assing to my makeRsyn.sh file's varibales. how to do this? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
If I understand correctly, you are looking towards sourcing a file of variable assignments into your script?
For example, let's say we have a file "confRsync" containing the following... Code:
var_1="value 1" var_2="value 2" Code:
#!/bin/sh . /path/to/confRsync echo "$var_1" echo "$var_2" Code:
$ ./makeRsyn.sh value 1 value 2 ZB |
||||
| Google The UNIX and Linux Forums |