Skip to content

Simple tool to include something into the begining of file inplace

License

Notifications You must be signed in to change notification settings

kephir4eg/prepend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prepend

TBD: Test

Simple command line utility to insert some text in the beginning of the file inplace. The process requires prefix*2 buffer size.

The utility is an optimization if the command sed -i '1i/sometext' [FILE], except that sed creates a temporary file copy. This utility does not.

USAGE : prepend PREFIXFILE FILE [FILE]*

WARNING: Process is not transactional. If interrupted in the middle, the file is left corrupted.

TODO :

  • Non-file sources for the prefix support.
  • Optimize for using smaller blocksize.
  • Create roll-back state file.
  • Insert at byte/line.
  • Check for prefix exists
  • Tests
  • Any requests?

About

Simple tool to include something into the begining of file inplace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published