Korn Shell Global funcations
- create file get_time in directory ~/kfunctionsfunction get_time{
TIME=$(date '+%m/%d/%y')
printf "$TIME\n"
}
- create .kshrc file
export FPATH=/export/home/jamesp/kfunctions
autoload get_time
- add entry to .profile
ENV=~.kshrc
- use global functions
#!/bin/ksh
SYSTIME=$(get_time)
echo "$SYSTIME\n"
0 Comments:
Post a Comment
<< Home