- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: intrepretation variable of variable
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 07:30 AM
11-26-2003 07:30 AM
CURRENT="abc"
SYSTEM=â abcâ
â ¦..
if [ $SYSTEM = "$CURRENT" ]; then #abc=abc
break
fi
....
And this is what I need to to, i.e. substitute $CURRENT in evaluation with $TARGET
$TARGET='$CURRENT'
CURRENT="abc"
if [ $SYSTEM = "$TARGET" ]; then #abc=$CURRENT
break
fi
....
So far I canâ t make $TARGET being interpreted into â abcâ , played enough with all â â / ` but nothing works, Is i
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 08:04 AM
11-26-2003 08:04 AM
Re: intrepretation variable of variable
Hope now made it more clear:
Assume code:
TARGET=â $CURRENTâ
CURRENT="abc"
SYSTEM=â abcâ
if [ $SYSTEM = "$TARGET" ]; then
echo â It workssssssssssssssss!!!!â
fi
I need assign value to TARGET thru value of CURRENT=abc, and then produce evaluation like:
If [ abc = abc];
Please assume all special characters (quotes) as just my bad trying, it doesnâ t work so far. But $TARGET should be i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 08:06 AM
11-26-2003 08:06 AM
Re: intrepretation variable of variable
Assume code :
TARGET='$CURRENT'
CURRENT="abc"
SYSTEM="abc"
if [ $SYSTEM = "$TARGET" ]; then
echo "It workssssssssssssssss!!!!"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 08:44 AM
11-26-2003 08:44 AM
Re: intrepretation variable of variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 05:17 PM
11-26-2003 05:17 PM
Re: intrepretation variable of variable
even though I couldn't get you clearly , have a look at this ,
var1=abc
abc2=hpux
if you wanna print the valut hpux through var1 then your command will be
eval echo "\${var1}2}" will give you the result hpux .
Sathish C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2003 06:26 PM
11-26-2003 06:26 PM
Re: intrepretation variable of variable
if [ "$SYSTEM" = $(eval echo $TARGET) ]
then
echo "It WORKSSSSSSSS"
else
echo "Sorry, my pressssiousssssss"
fi
;-)