This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh93 | |
# Set variables for conversion from number of seconds | |
typeset -i minute=60 hour=$minute*60 day=$hour*24 week=$day*7 | |
# Test value (integer in seconds) passed to script | |
if [ $1 -ge $week ]; then | |
printf "%dw:%dd:%02dh:%02dm:%02ds" $(($1/$week)) $(($1%$week/$day)) $(($1%$day/$hour)) $(($1%$hour/$minute)) $(($1%$minute)) | |
elif [ $1 -ge $day ]; then | |
printf "%dd:%02dh:%02dm:%02ds" $(($1/$day)) $(($1%$day/$hour)) $(($1%$hour/$minute)) $(($1%$minute)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if (( $# > 0 )); then destination=$1; else destination="."; fi | |
# Check for required commands | |
required=(awk grep lynx wget); missing=() | |
for command in ${required[@]}; do | |
hash $command 2>/dev/null || missing+=($command) | |
done | |
if (( ${#missing[@]} > 0 )); then | |
echo "[FATAL] could not find command(s): ${missing[@]}. Exiting!" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/csh -f | |
set id = `jls | grep $1 | awk '{print $1;}'` | |
jexec $id csh |