The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Converting a String variable into Integer neeto UNIX for Dummies Questions & Answers 2 05-22-2008 04:38 PM
Converting a decimal into integer idro Shell Programming and Scripting 4 10-31-2007 01:51 PM
Checking if string contains integer haz Shell Programming and Scripting 7 09-11-2006 03:51 AM
command for converting string to integer esham Shell Programming and Scripting 1 08-04-2005 08:20 AM
Integer to String psilva High Level Programming 2 08-17-2001 01:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-05-2008
ROOZ ROOZ is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 48
Converting integer to String

Hi everyone,
I would like to know how to convert an integer to a string. for instance if i=1 i would like to creat a variable called constant1. i want to do this in a for loop so for each value of i, i create a new variable such as constant2, constant3,... and so on.

for i in 1 2 3
do
commands to create the variables

done

thank you
  #2 (permalink)  
Old 06-05-2008
ROOZ ROOZ is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 48
guys i just found out how to do it
i only need to use {} brackets around i
for i in 1 2 3

variable ${i}=....

done
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0