#!/bin/sh user_css="/www/saku/css/user.css" tmp_user_css="/www/saku/css/.tmp_user.css" css_before="dd#b" css_after=":after { content: url(\"http://localhost/saku/css/shiori.png\"); }" help(){ echo "ex) $0 add 355bb12f" echo "ex) $0 del 355bb12f" } if [ -z "$2" ]; then help exit 1 fi if [ "$1" = "add" ]; then echo "$css_before$2$css_after" echo "$css_before$2$css_after" > $user_css exit 0 elif [ "$1" = "del" ]; then cp $user_css $tmp_user_css grep "$2" $tmp_user_css grep -v "$2" $tmp_user_css > $user_css exit 0 else help exit 1 fi exit 1