Web与互联网管理实用脚本介绍
在Web与互联网管理领域,有许多实用的脚本可以帮助我们更高效地完成各种任务。下面将详细介绍几个实用脚本,包括外部链接检查、Apache密码管理以及文件同步。
1. 外部链接检查脚本(checkexternal)
在网站维护过程中,检查外部链接的有效性是一项重要任务。 checkexternal 脚本可以帮助我们完成这个任务。
trap "$(which rm) -f traverse*.errors reject*.dat traverse*.dat" 0
outfile="$(echo "$1" | cut -d/ -f3).errors.ext"
URLlist="$(echo $1 | cut -d/ -f3 | sed 's/www\.//').rejects"
rm -f $outfile # Ready for new output
if [ ! -e "$URLlist" ] ; then
echo "File $URLlist not found. Please run checklinks first." >&2
exit 1
fi
if [ ! -s "$URLlist" ] ; then
echo "There don't appear to be any external links ($URLlist is empty)." >&2
exit 1
fi
#### Now, finally, we're ready to begin...
for URL in $(cat $URLlis
超级会员免费看
订阅专栏 解锁全文
2万+

被折叠的 条评论
为什么被折叠?



