#!/usr/bin/env bash

# -----------------------------------------------------------------------------
# Info:
# 	Miroslav Vidovic
# 	add_header.sh
# 	19.12.2016.-12:27:34
# -----------------------------------------------------------------------------
# Description:
#   Add the info header to an existing bash script.
# Usage:
#   add_header.sh script_name.sh
# -----------------------------------------------------------------------------
# Script:

input_file=$1

timestamp=$(date +"%d.%m.%Y.-%H:%M:%S")

sed -i -e "1i#!/bin/bash\n\n# -------------------------------------------------------\n# Info:\n#   Miroslav Vidovic\n#   $input_file\n#   $timestamp\n# -------------------------------------------------------\n# Description:\n#\n# Usage:\n#   $input_file\n#\n#   Lorem ipsum usage\n# -------------------------------------------------------\n# Script:\n" $input_file


Add info header to existing bash script
Add info header to existing bash script
