This is a discussion on Read one integer from a file, cannot find info within the Shell scripting forums, part of the Development/Scripting category; I have read three linux scripting tutorials and still cannot find the answer to this... To many of you this ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
I have read three linux scripting tutorials and still cannot find the answer to this... To many of you this may sound too simple, but as a beginner I am having a real hard time finding out how to read a single integer stored in a file, to process its value thereafter. his is what I have:
# user at console types input data file name: read fname1 # open fname1 and load integer to int1 open $fname1 read $fname1, int1 echo expr $int1 / 2 That's all I need to do, please help me with the syntaxt, I am following the tutorials but would like to know how to open, read a data element so I can do something with it before I go forward. Thank you |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To find and replace in text file | nashtech | Shell scripting | 3 | 07-31-2008 06:46 PM |
| Read arguments from a file and pass them to binary file | AHJ | Shell scripting | 1 | 10-31-2007 06:04 PM |
| can not find the username in /etc/passwd file | subrata1in | Getting started tutorials | 5 | 03-27-2007 11:45 AM |
| can not find user name in /etc/passwd file | subrata1in | Linux software | 2 | 03-26-2007 10:44 AM |
| find out info. reg. files for each user in the system | ganes | Solaris/OpenSolaris | 6 | 09-20-2005 06:49 PM |