![]() |
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 |
| 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 |
| Assigning output to a variable | jpmena | Shell Programming and Scripting | 3 | 03-27-2008 04:39 AM |
| assigning values to a variable | trichyselva | UNIX for Dummies Questions & Answers | 3 | 12-14-2007 01:55 AM |
| Assigning Value of variable | janemary.a | Shell Programming and Scripting | 2 | 05-11-2007 05:53 AM |
| Reading a path (including ref to shell variable) from file | lojzev | Shell Programming and Scripting | 1 | 09-10-2006 11:05 PM |
| Assigning a value to variable | sirtrancealot | Shell Programming and Scripting | 3 | 07-15-2006 03:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Reading file and assigning that to Variable
I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh cat dbsnap2.txt | grep 'Rows selected' | cut -c 46-60 > Rows_selected.tmp cat Rows_selected.tmp rows=`echo "Rows_selected.tmp"` echo "Rows selected are ............" rows Output coming out is -------------------- 128622023 Rows selected are ............ rows Output expected is -------------------- 128622023 Rows selected are ............ 128622023 Appreciate your help. Let me know if you need more info. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|