Reading, writing and substring operations in Shell Script
Posted on 2003-10-21
I am new to shell scripts so please excuse my newbie questions or mistakes
1) How do i read a file into a shell script variable.? While reading i should preserve all special characters, tabs, carriage returns etc, ineffect everything that is there in that file should be kept as is. A text file needs to be created by this script which will further be processed by a Java program.
2) Once i read the file, i need to check if the first 2 characters are **.
3) How do i write to a new file everytime the script is executed. The name is not very important.
Thank you all for your help