unix script - problem in making a text file - creating text file with some unicode character [duplicate]
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'.
精彩评论