Execute unix shell script to text file using the script

Hi all,

I am beginner in UNIX...I want to use unix shell script to create text.file...I know how to use using by command...can anybody tell me for the script?

Thanks

try the simple script to create a file name text_file .

#!/bin/sh  
  cat >text_file.txt <<EOF
  this is the text file
  thank u
  EOF

use the following code in your script. it will create a file

>text.txt

Let say if i have a script file call count.sh.When i run the script it generate the text file.How to do using script.

Thanks.

you might looking for Generation of random file on each run..

$cat file_gen.sh
 touch {a,b,c}${RANDOM}