The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-13-2008
Migrainegirl Migrainegirl is offline
Registered User
  
 

Join Date: May 2008
Posts: 3
The echo gives me a number, which it's supposed to do.
The addition is used to round up the numbers: 231.2 becomes 232, but 231.0 stays 231.

I tried it again with the $x variable explicitly defined and then it worked. So the problem seems to be $x. (sorry, I didn't get much sleep last night ) This changes my question:
If I want to use my script with the original text file as input (like this: sh test.sh < file.txt), how do I call on the original file inside the script?
I obviously thought that the $x in 'split $x -d -l $y split/$x' would be replaced with 'file.txt', but it's not.

Last edited by Migrainegirl; 05-13-2008 at 08:53 AM..