- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to assign varibale in another 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
Discussions
Discussions
Forums
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
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
тАО10-01-2009 05:41 AM
тАО10-01-2009 05:41 AM
How to assign varibale in another variable
I'm facing one issue in shell script :
I assign some value to a variable ser and now I want to assign some value to another varibale i.e.like adb$ser as below :
$ ser=as
$ abd$ser=4
ksh: adbas=4: not found
but I'm geeting error as shown above, pl. help me to resolev it.
thx in advance
sanjeev gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2009 06:27 AM
тАО10-01-2009 06:27 AM
Re: How to assign varibale in another variable
bash$ eval abd$ser=4
bash$ echo $abdas
4
"man
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 11:03 PM
тАО10-04-2009 11:03 PM
Re: How to assign varibale in another variable
Pl. help me out on it.
sanjev gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 11:15 PM
тАО10-04-2009 11:15 PM
Re: How to assign varibale in another variable
under ksh I did exactly
# ser=as
# eval abd$ser=4
# echo $abdas
4
if it doesn't work you can try
# set -x
# ser=as
# eval abd$ser=4
It will display the line it is trying to execute before executing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 11:25 PM
тАО10-04-2009 11:25 PM
Re: How to assign varibale in another variable
agui02# ksh
agui02# echo $0
ksh
agui02# ser=as
agui02# eval adb$ser=4
agui02# echo adb$ser
adbas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 11:28 PM
тАО10-04-2009 11:28 PM
Re: How to assign varibale in another variable
agui02# echo $adbas
4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2009 06:48 AM
тАО10-05-2009 06:48 AM
Re: How to assign varibale in another variable
You're not able to do _what_?
Showing actual commands with their actual
output can be more helpful than vague (or no)
descriptions and interpretations.
You know, like what _every_ answer here did.