![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Storing count(*) into unix variable | mervinboyz | Shell Programming and Scripting | 1 | 03-26-2008 11:14 PM |
| Storing a variable? | hoover90 | Shell Programming and Scripting | 4 | 01-26-2008 09:39 PM |
| Using 'defaults read' and storing the output in a variable | davewg | Shell Programming and Scripting | 0 | 11-14-2007 08:04 AM |
| storing output of awk in variable | mab_arif16 | Shell Programming and Scripting | 3 | 05-07-2006 06:15 PM |
| Storing values in variable | matrixmadhan | Shell Programming and Scripting | 1 | 04-01-2005 01:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Storing the output into a variable
Hi unix gurus,
I am trying to store the result of a command into a variable. But it is not getting stored. x='hello' y=echo $x | wc -c but it is giving the output as 0(zero) Pls help me its very urgent |
|
||||
Ok,fine .Its working.But when i am trying to use the result in another calculation its not giving the proper result.x='hello' y=$(echo $x | wc -c) echo $y z='expr $y + 1 ' echo $z Its printing expr $y + 1 instead of 7. any idea pls. cheers Ravi Raj kumar |
|
||||
|
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|