久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

自己寫的一個(gè)帶確認(rèn)功能的rm函數(shù)

 bigyellowdoc 2012-08-17


linux/unix自帶的的rm沒有確認(rèn)功能,自己寫了一個(gè)帶確認(rèn)功能的, 供自己娛樂

shell版
: /bin/sh -f
echo "$1"
echo -n "do you want to delete these files," $1 "?(y/n) .\b"
read ANSWER
echo "$ANSWER"

if [ $ANSWER = y -o "$ANSWER" = "Y" ];
then
rm $1
echo $1 "have been deleted"
else
echo "Action cancelled"
fi

c shell版

#! /bin/csh -f

set files = $argv[1];
echo "The following files $files are going to be deleted.";

echo -n "do you want to delete these files?(y/n) \b"
set ANSWER = $< # stdin input
if ( $ANSWER == y | $ANSWER == Y) then
/bin/rm $files;
echo "the files have been deleted";
endif

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點(diǎn),。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多