mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-09 12:16:01 +02:00
20 lines
344 B
ObjectPascal
20 lines
344 B
ObjectPascal
Program Example23;
|
|
|
|
{ Program to demonstrate the Chmod function. }
|
|
|
|
Uses BaseUnix,Unix;
|
|
|
|
Var F : Text;
|
|
|
|
begin
|
|
{ Create a file }
|
|
Assign (f,'testex21');
|
|
Rewrite (F);
|
|
Writeln (f,'#!/bin/sh');
|
|
Writeln (f,'echo Some text for this file');
|
|
Close (F);
|
|
fpChmod ('testex21',&777);
|
|
{ File is now executable }
|
|
execl ('./testex21');
|
|
end.
|