Chinaunix

标题: How to write file and read file ? [打印本页]

作者: ksc    时间: 2003-03-04 13:23
标题: How to write file and read file ?
Dear All :
        用C Shell
        我如何寫text到一個file?
        如何從file讀入text?
        可否提供範例,Thanks!!!
作者: biansj    时间: 2003-03-04 13:58
标题: How to write file and read file ?
echo "hello \c">file1
echo "world">>file1
read va1 va2 <file1
echo $va1 $va2
作者: ksc    时间: 2003-03-04 15:03
标题: How to write file and read file ?
Thanks biansj
作者: nmgzw    时间: 2003-03-04 15:18
标题: How to write file and read file ?
ai~~~~~~~,来晚了,在论坛里等了一天了,好不容易看见个me能解答的问题!还被老头给回答了!
作者: nkliyong    时间: 2003-03-04 16:03
标题: How to write file and read file ?
[quote]原帖由 "nmgzw"]ai~~~~~~~,来晚了,在论坛里等了一天了,好不容易看见个me能解答的问题!还被老头给回答了![/quote 发表:


一定要坚持,在等等
作者: 红袖添香    时间: 2003-03-04 16:08
标题: How to write file and read file ?
[quote]原帖由 "nmgzw"]ai~~~~~~~,来晚了,在论坛里等了一天了,好不容易看见个me能解答的问题!还被老头给回答了![/quote 发表:


^o^
作者: ksc    时间: 2003-03-04 16:18
标题: How to write file and read file ?
還有機會:
執行 read 的時候,會出現

read var1 < text

var1: Undefined variable




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2