Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
################################################################################ # Function: usage_exit # Description: Prints the usage message for this script and then exits # Arguments: $1 :- Exit code; defaults to 1 # Outputs: Prints description of how to call this script function usage_exit { local exit_code=1 if [[ ${1-} =~ ^[0-9]+$ ]]; then exit_code="$1" fi cat << EOT Usage: $(basename "$0") [options]... -u|--user
(Required) The owner of the generated file -d|--destdir
(Required) The dir into which to save the new file -r|--remove Causes previous files to be removed -v|--verbose Displays verbose output -h|--help Displays this message and aborts the script NOTE: The
and
arguments are mandatory and *must* be supplied EOT exit "${exit_code}" }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)