ex23.pp 349 B

12345678910111213141516171819
  1. Program Example23;
  2. { Program to demonstrate the Chmod function. }
  3. Uses BaseUnix,Unix;
  4. Var F : Text;
  5. begin
  6. { Create a file }
  7. Assign (f,'testex21');
  8. Rewrite (F);
  9. Writeln (f,'#!/bin/sh');
  10. Writeln (f,'echo Some text for this file');
  11. Close (F);
  12. fpChmod ('testex21',&777);
  13. { File is now executable }
  14. execl ('./testex21');
  15. end.