mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update iiab-diagnostics
This commit is contained in:
parent
340b3a8016
commit
047606c05e
1 changed files with 11 additions and 8 deletions
|
@ -38,8 +38,12 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail
|
||||||
tail -$2 $1 | iconv -t UTF-8//IGNORE >> $outfile
|
tail -$2 $1 | iconv -t UTF-8//IGNORE >> $outfile
|
||||||
fi
|
fi
|
||||||
echo >> $outfile
|
echo >> $outfile
|
||||||
else
|
elif [ -h $1 ]; then
|
||||||
if [ -d $1 ]; then
|
ls -l $1 >> $outfile
|
||||||
|
echo >> $outfile
|
||||||
|
echo "SYMLINK DOES NOT LEAD TO A REGULAR FILE!" >> $outfile
|
||||||
|
echo >> $outfile
|
||||||
|
elif [ -d $1 ]; then
|
||||||
ls -ld $1 >> $outfile
|
ls -ld $1 >> $outfile
|
||||||
echo >> $outfile
|
echo >> $outfile
|
||||||
echo "THIS IS A DIRECTORY NOT A FILE!" >> $outfile
|
echo "THIS IS A DIRECTORY NOT A FILE!" >> $outfile
|
||||||
|
@ -47,7 +51,6 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail
|
||||||
else
|
else
|
||||||
echo "FILE DOES NOT EXIST: $1" >> $outfile
|
echo "FILE DOES NOT EXIST: $1" >> $outfile
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cat_file() {
|
function cat_file() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue