Go to: Return value. Related commands. Examples.
// Make a sample file to use as a test example // $exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" ); $fileId=`fopen $exampleFileName "w"`; fprint $fileId "Hello there\n"; fclose $fileId; // Read the first word out of the file, then rewind and read it again // $fileId=`fopen $exampleFileName "r"`; print ( `fgetword $fileId` + "\n" ); frewind $fileId; print ( `fgetword $fileId` + "\n" ); fclose $fileId;