Can you first tell us what OS you are on? (ie: Linux, Unix, Windows, Mac)
Also, are you wanting to create the file with the same permissions? attributes? what? Can you provide a few more details about your goal?
Regards,
Jeff
Hi Jeff,
Thanks a lot for the reply. I always expect a reply from atleast you :-) . I will be using Windows environment as well as Solaris environment.
Suppose i have a file
a.txt with 4 rows as shown below:-
************************************************** ************
i@am@amit@and@i@work@in@this@world
i@am@amit@and@i@work@in@this@world
i@am@amit@and@i@work@in@this@world
i@am@amit@and@i@work@in@this@world
************************************************** ************
i want my code to parse the above file such that only "amit" and "work" are picked up and put into a file
b.txt as follows:-
************************************************** **************
amit@work
amit@work
amit@work
amit@work
************************************************** ************************
I am not too concerned about the permissions. Whatever permissions a.txt has, i want to create file b.txt file with the same permissions either in the same directory or a different directory.
Hopefully i have been able to explain you my requirement.
Thanks in advance for your help.
Cheers,
Amit