![]() |
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 |
| retrieve value from a file | satish@123 | Shell Programming and Scripting | 1 | 05-17-2008 07:40 AM |
| how to retrieve a particular character from a file? | singalla | UNIX for Dummies Questions & Answers | 1 | 02-27-2008 10:05 AM |
| How to retrieve a particular line from a file | vinayap | UNIX for Dummies Questions & Answers | 2 | 07-11-2007 02:16 PM |
| Retrieve message from file | mpang_ | Shell Programming and Scripting | 5 | 02-02-2007 09:38 AM |
| retrieve timestamp associated with a file | 2nilotpal | UNIX for Dummies Questions & Answers | 2 | 08-08-2002 06:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Retrieve data from a file
Hello guys
I want to retrieve two data from a file, like this: bash-2.03$ cat numtest 123456 123457 bash-2.03$ more ./test_num #!/bin/bash num1= num2= cnt=1 while read x do num${cnt}=$x cnt=$(($cnt+1)) done <$1 echo $num1 "\n" $num2 But when i executed this script, error popped up bash-2.03$ ./test_num numtest ./test_num: num1=123456: command not found ./test_num: num2=123457: command not found \n Can anyone give any suggestion? Thank you. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|