免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5104 | 回复: 10
打印 上一主题 下一主题

[SCO UNIX] 控制台里面的内容如何输出到文本文件中? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-10-08 10:09 |只看该作者 |倒序浏览
急等,谢谢!!

论坛徽章:
0
2 [报告]
发表于 2003-10-08 10:12 |只看该作者

控制台里面的内容如何输出到文本文件中?

script

论坛徽章:
0
3 [报告]
发表于 2003-10-08 10:17 |只看该作者

控制台里面的内容如何输出到文本文件中?

随便,只要能把里面的内容取出来就行!

论坛徽章:
0
4 [报告]
发表于 2003-10-08 11:19 |只看该作者

控制台里面的内容如何输出到文本文件中?

seanding    是说用script 命令。

论坛徽章:
0
5 [报告]
发表于 2003-11-07 08:52 |只看该作者

控制台里面的内容如何输出到文本文件中?

seanding :在控制台下使用该命令后,文件存在那呢?

论坛徽章:
0
6 [报告]
发表于 2003-11-07 17:26 |只看该作者

控制台里面的内容如何输出到文本文件中?

你可以试试以下命令。但我没有试过。也不知道能否PC上读出来。

Synopsis
>;>;>; console-command >; fat:filename/dva0
where filename must have an extention (filename.txt)
Storing the systems configuration to a floppy file:
>;>;>; show config >; fat:showconfig.fat/dva0
Displaying the contents of a floppy file to your console screen:
>;>;>; cat fat:showcofig.fat/dva0 | more
Stores the system power-up seqence:
>;>;>; cat el >; x
>;>;>; cat x >; fat:cat_el.fat/dva0
This example combines the above two commands into one:

>;>;>; cat el >; fat:cat_el.fat/dva0

论坛徽章:
0
7 [报告]
发表于 2003-11-07 20:49 |只看该作者

控制台里面的内容如何输出到文本文件中?

接到超级终端上不就行了!

论坛徽章:
0
8 [报告]
发表于 2003-11-07 22:14 |只看该作者

控制台里面的内容如何输出到文本文件中?

1. use the robert method , you can do it .
just take the console as one simple shell.

2. you can use the hyperterm or other serial tools to record your command and output.

the attachment is the example.

(you can use the floppy, and do the command
>;>;>;cat fat:tempsh.txt/dva0 >;tempsh.txt then do it >;>;>;tempsh.txt to collect the information of the console. )

tempshtxt.jpg

6.74 KB, 下载次数: 29

tempsh.txt (jpg) (one shell in the console) save the tempshtxt.jpg to tempsh.txt

论坛徽章:
0
9 [报告]
发表于 2003-11-07 22:15 |只看该作者

控制台里面的内容如何输出到文本文件中?

can not upload file.

tempshtxt.jpg

6.74 KB, 下载次数: 779

save it to txt file

论坛徽章:
0
10 [报告]
发表于 2003-11-07 22:18 |只看该作者

控制台里面的内容如何输出到文本文件中?

echo "this is a shell script used in the console">;temp1.txt
        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*    This is show output                 *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show >;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*    This is show config output          *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show config>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is show power output            *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show power>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is show memory output           *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show memory>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is show device output           *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show device>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is show version output          *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

show version>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is show PAL output              *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo

show PAL>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is Man output                   *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

man>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*    This is ls output                   *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

ls>;>;temp1.txt

        echo >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "*   This is ls -l output                 *" >;>;temp1.txt
        echo "*                                        *" >;>;temp1.txt
        echo "******************************************" >;>;temp1.txt
        echo >;>;temp1.txt

ls -l>;>;temp1.txt

if (ls temp1.txt)
then
    echo "The tmp file temp1.txt has been created"
    ls -l temp1.txt
   
    if (cat temp1.txt>;fat:temp1.txt/dva0)
    then
        echo "The tmp file temp1.txt has been copied to floppy"
    else
        echo "Warning: Copying tmp file temp1.txt has errors."
    fi
else
    echo "Warning: Creating tmp file temp1.txt has errors."
fi

echo "this is a shell script used in the console to download all script file in the console">;temp2.txt
echo "at the end of this file is the man page of all command. ">;>;temp2.txt
        echo >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "*    This is ls-l|grep r-x               *" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo >;>;temp2.txt

ls -l |grep r-x- >;>;temp2.txt

        echo >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "*    This is ls -l|grep rxw output       *" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo >;>;temp2.txt

ls -l|grep rwx >;>;temp2.txt

        echo >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "*   This is ls -l |grep r-xb output      *" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo >;>;temp2.txt

ls -l |grep r-xb>;>;temp2.txt

        echo >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "*   This is man * output                 *" >;>;temp2.txt
        echo "*                                        *" >;>;temp2.txt
        echo "******************************************" >;>;temp2.txt
        echo >;>;temp2.txt

man * >;>;temp2.txt
if (ls temp2.txt )  
then
     echo "the tmp file temp2.txt has been created"
     ls -l temp2.txt
     
     if (cat temp2.txt>;fat:temp2.txt/dva0)
     then
         echo "the file temp2.txt has been copied to floopy"
     else
         echo "Warning: Copying tmp file temp2.txt has errors"
     fi
else
     echo "Warning: Creating tmp file temp2.txt has errors."
fi

echo "r-x-">;filemod
echo "rwx-">;>;filemod
chmod -x filemod

if (ls filelist)
then
    rm filelist
    echo "there's a file named filelist and remove it"
fi

if (ls filenum)
then
    rm filelist
    echo "there's a file named filelist and remove it"
fi

ls -l|grep -f filemod|find 5>;>;filelist
for i in `cat filelist` ; do
    cat $i>;fati/dva0
    echo "the file $i has been copied to floppy"
    sleep 1
    echo "d">;>;filenum
done

echo "Total copied files "
wc -l filenum
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP