Last active
February 24, 2016 09:51
-
-
Save xx7y7xx/ce339cb02d2645bc9102 to your computer and use it in GitHub Desktop.
删除无效的效果图节点
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/bash | |
# Usage: | |
# Save xiaoguotu table to /tmp/joblist.txt | |
# remove_preview_node.sh pansuo | |
# Download this script: https://gist.github.com/xxd3vin/ce339cb02d2645bc9102 | |
joblist=/tmp/joblist.txt | |
tmpfile=${joblist}.tmp | |
if [ -z $1 ]; then | |
echo "pls input user name" | |
exit 1 | |
fi | |
name=$1 | |
awk '{ print $6 }' $joblist > $tmpfile | |
while read jobid; do | |
if [[ $jobid != job* ]]; then | |
echo "bad jobid: $jobid" | |
continue | |
fi | |
cmd="curl -s -I -u admin:admin -X DELETE \"192.168.0.66:9999/content/users/_${name}_40spolo.org/previewlib/$jobid\"" | |
echo $cmd | |
$cmd | head -n 1 | |
#ret=$? | |
#if [ $? -ne 0 ]; then | |
# echo "$jobid $ret" | |
#fi | |
done < $tmpfile | |
rm -rf $tmpfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment