QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 415|回复: 3

sh是幹什麽用的

[复制链接]
发表于 2003-6-6 23:51:02 | 显示全部楼层 |阅读模式
sh是幹什麽用的? 我的linux字典裏竟然沒有這個解釋
发表于 2003-6-7 08:37:21 | 显示全部楼层
执行脚本程序的命令!
回复

使用道具 举报

 楼主| 发表于 2003-6-7 16:02:44 | 显示全部楼层
請問什麽是腳本程序?
回复

使用道具 举报

发表于 2003-6-7 17:20:05 | 显示全部楼层
介绍一个脚本
作者:javalee


[code:1]
#!/bin/ksh
# Script name: Speller
#
#
# Purpose: Check and fix spelling errors in a file
#

exec < tmp   # opens the tmp file
while read line  # read from the tmp file
do
print $line
print -n "Is this word correct? [Y/N] "
read answer < /dev/tty  # read from the terminal
    case $answer in
    [Yy]*)
        continue
            ;;
    *)
        print "New word? "
        read word < /dev/tty
        sed "s/$line/$word/" tmp > error
        mv error tmp
        print $word has been changed.
            ;;
    esac
done

[/code:1]

这就是!!!!!!!!!!!!!!!!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-2 03:27 , Processed in 0.057000 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表