Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../.././../etc/itss/os_tools.source
Real path: /etc/itss/os_tools.source
Zurück
#!/bin/bash OS="SunOS" OPERATINGSYSTEM="uname -o" case $OPERATINGSYSTEM in "GNU/Linux") OS="linux" ;; "SunOS") OS="solaris" ;; *) OS="solaris" ;; esac GAWK=gawk for tool_awk in /usr/bin/gawk /opt/csw/bin/gawk /usr/bin/awk; do if [ -f $tool_awk ] ; then GAWK=$tool_awk break; fi done AWK=$GAWK DF="gdf" for tool_df in /usr/bin/gdf /usr/bin/df /bin/df; do if [ -f $tool_df ] ; then DF=$tool_df break; fi done SED="sed" for tool_sed in /usr/bin/gsed /usr/bin/sed /bin/sed; do if [ -f $tool_sed ] ; then SED=$tool_sed break; fi done DU="gdu" for tool_du in /usr/bin/gdu /usr/bin/du; do if [ -f $tool_du ] ; then DU=$tool_du break; fi done CAT="cat" for tool_cat in /usr/bin/cat /bin/cat; do if [ -f $tool_cat ] ; then CAT=$tool_cat break; fi done SORT="sort" for tool_sort in /usr/bin/gsort /usr/bin/sort; do if [ -f $tool_sort ] ; then SORT=$tool_sort break; fi done TR="tr" for tool_tr in /usr/bin/gtr /usr/bin/tr; do if [ -f $tool_tr ] ; then TR=$tool_tr break; fi done GREP="grep" for tool_grep in /usr/bin/gegrep /usr/bin/egrep /usr/bin/ggrep /usr/bin/egrep /bin/egrep /bin/grep; do if [ -f $tool_grep ] ; then GREP=$tool_grep break; fi done EGREP=$GREP DATE="date" for tool_date in /usr/bin/gdate /opt/csw/bin/gdate /usr/bin/date /bin/gdate /bin/date; do if [ -f $tool_date ] ; then DATE=$tool_date break; fi done IFCONFIG="ifconfig" for tool_ifconfig in /sbin/ifconfig /bin/ifconfig /usr/bin/ifconfig /usr/sbin/ifconfig; do if [ -f $tool_ifconfig ] ; then IFCONFIG=$tool_ifconfig break; fi done CRONTAB="crontab" for tool_crontab in /usr/bin/crontab /bin/crontab; do if [ -f $tool_crontab ] ; then CRONTAB=$tool_crontab break; fi done OS_TOOLS_DEBUG=0 if [ "x$OS_TOOLS_DEBUG" = "x1" ]; then echo "$GAWK" echo "$AWK" echo "$DF" echo "$SED" echo "$DU" echo "$CAT" echo "$SORT" echo "$TR" echo "$GREP" fi