开发者

unix script - problem in making a text file - creating text file with some unicode character [duplicate]

This question already has an answer here: unix script - problem in making a text file (1 answer) Closed 9 years ago. 开发者_如何学JAVA

I am writing a simple unix script as follows:

#!/bin/bash
mkdir tmp/temp1
cd tmp/temp1
echo "ab bc cj nn mm" > output.txt
grep 'ab' output.txt > newoutput.txt

I got following error message:

grep : No such file or directory found output.txt

but when I looked into the directory the text is created output.txt...but the type of the file was TXT....I am not sure what it is any help?? Actually it creates the text file as "output" some unicode character or something...any help????


Try running the script without using '.txt'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜