The UNIX and Linux Forums  


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
Need a sed command that uses variable ketkeep Shell Programming and Scripting 2 06-07-2008 02:36 PM
Question On Command in Variable scotbuff Shell Programming and Scripting 4 10-29-2007 08:23 PM
How to Store command O/P to a variable... smartbuddy UNIX for Dummies Questions & Answers 7 08-24-2007 08:49 AM
Export command giving Variable Name vs the Value set for the Variable ParNone UNIX for Dummies Questions & Answers 2 04-03-2006 12:43 PM
Command output to a variable. videsh77 Shell Programming and Scripting 8 12-16-2004 06:06 AM

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 05-24-2007
ammu ammu is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 79
set variable command

Hi all,

I want to set a variable in ksh shell (prompt) and echo the value.

$ set x=5
$echo $x

But it is returning null. Can any one please help.

Thanks in advance
  #2 (permalink)  
Old 05-24-2007
dfs dfs is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 10
Just do:

x=5
echo $x

should work fine
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 09:51 PM.


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