![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| assign awk's variable to shell script's variable? | tiger2000 | Shell Programming and Scripting | 3 | 4 Weeks Ago 04:47 AM |
| Insert a line including Variable & Carriage Return / sed command as Variable | lowmaster | Shell Programming and Scripting | 2 | 05-20-2009 12:26 AM |
| Sed variable substitution when variable constructed of a directory path | alrinno | Shell Programming and Scripting | 2 | 07-11-2008 03:24 PM |
| Enviornment Variable in B shell (I call it nested variable) | princelinux | Shell Programming and Scripting | 4 | 07-02-2008 02:35 AM |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 08:28 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi Chebarbudo,
in bash (and only in bash) the correct syntax would be: Code:
#!/bin/bash
while IFS="=" read lvalue rvalue; do
eval $lvalue=$rvalue
done < <(grep -v '^#' conf)
echo "-$A-$B-$C-"
Code:
grep -v '^#' conf|
{ while IFS="=" read lvalue rvalue; do
eval $lvalue=$rvalue
done
echo "-$A-$B-$C-"
}
|
|
||||
|
|
![]() |
| Bookmarks |
| Tags |
| variable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|