Skip to content

Miscellaneous scripts and tools I use on my system (usually living in ~/bin)

License

Notifications You must be signed in to change notification settings

Bennett-Petzold/Misc-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Misc-Scripts

Miscellaneous scripts, tools, and aliases I use on my system (usually living in ~/bin).

Aliases are in aliases.md.

Each script/tool is provided in its own file with a README for usage and dependencies. All scripts are provided without any guarantee of functionality or safety -- read them before using, and run them on your system at your own risk. They are only built to run on UNIX environments.

Some scripts require the "-S" extension provided on FreeBSD since 6.0 and on coreutils since 8.30. To find all files relying on this extension, find and gawk.

find -type f -exec \
	gawk '/^#!\/usr\/bin\/env -S/ { print FILENAME }
		FNR == 1 { nextfile }' {} \+

To replace "/usr/bin/env" use find, gawk, xargs, and sed.

find -type f -exec \
	gawk -v ORS='\0' '/^#!\/usr\/bin\/env -S/ { print FILENAME }
		FNR == 1 { nextfile }' {} \+ | \
	xargs -0L 1 sed -i '1s:^#!/usr/bin/env:#!REPLACEMENT:'

The top-level "convert.bash" converts my system shebang to a more general "/usr/bin/env" launch. It requires find, gawk, and GNU xargs.

About

Miscellaneous scripts and tools I use on my system (usually living in ~/bin)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages