mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-20 03:31:42 +00:00
New Script Example in response to Issue #120
This commit is contained in:
parent
fe861c5179
commit
ee1dce2ce6
26
EXAMPLES/TOUCH.txt
Normal file
26
EXAMPLES/TOUCH.txt
Normal file
@ -0,0 +1,26 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# This script touchs a file or directory
|
||||
#
|
||||
#
|
||||
SET TOUCHFILE = $1
|
||||
IF [ -D $TOUCHFILE ]
|
||||
# Touch a Direcory
|
||||
ECHO -N "" > ${TOUCHFILE}/TMPTOUCHFILE
|
||||
RM -Q ${TOUCHFILE}/TMPTOUCHFILE
|
||||
ELSE
|
||||
IF [ -F $TOUCHFILE ]
|
||||
# Touch an existing File
|
||||
CP -Q ${TOUCHFILE} TMPTOUCHFILE
|
||||
CP -Q TMPTOUCHFILE ${TOUCHFILE}
|
||||
RM -Q TMPTOUCHFILE
|
||||
ELSE
|
||||
# Create New Empty File
|
||||
ECHO -N "" > ${TOUCHFILE}
|
||||
FI
|
||||
FI
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/EXAMPLES/TOUCH
|
Loading…
Reference in New Issue
Block a user