Delete a file: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
m →‎{{header|Wren}}: Changed to Wren S/H
Aartaka (talk | contribs)
Add ed example
 
Line 598:
<file:///input.txt>.delete(null)
<file:///docs>.delete(null)</syntaxhighlight>
 
=={{header|ed}}==
 
<syntaxhighlight lang="sed">
# by Artyom Bologov
# Write nothing to the file.
# That's the best one can do with ed native APIs.
,d
w input.txt
# Invoking the shell.
# More reliable but surrendering to the OS.
!rm input.txt
!rm -r docs/
!rm /input.txt
!rm -r /docs/
Q
</syntaxhighlight>
 
=={{header|Elena}}==