Results 1 to 3 of 3
Using this section of code:
Code:
lynx -source wwwdotwebsitedotcom > file1.txt tr '\r' '\n' <file1.txt > file2.txt
I end up with the opposite of what I need:
file1 gets the ...
- 01-29-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 4
Lynx -source, change from Mac to UNIX
Using this section of code:
I end up with the opposite of what I need:Code:lynx -source wwwdotwebsitedotcom > file1.txt tr '\r' '\n' <file1.txt > file2.txt
file1 gets the UNIX formatting but is blank
file2 gets the text but still has the Mac formatting
The goal is to get file1.txt that is scraped in Mac format to end up output as file2.txt in UNIX format to be grepped later, but only run this one command.
Putting a pipe between "file1.txt | tr '\r' etc.." only makes it worse.
Probably some idiotically simple solution but I guess I gotta start somewhere and all my mutated efforts give me mutated results.
Thanks for any ideas.
- 01-30-2011 #2
You probably want something like:
lynx -source wwwdotwebsitedotcom > file1.txt;cat file1.txt| tr '\r' '\n' > file2.txt
Or just:
lynx -source wwwdotwebsitedotcom | tr '\r' '\n' > file2.txt
if you don't need file1 as a remainder.Last edited by Mudgen; 01-30-2011 at 02:37 AM. Reason: add
- 01-30-2011 #3Just Joined!
- Join Date
- Jan 2011
- Posts
- 4
Thank you very much greyhairweenie.
That was exactly what I was trying for.
I must have tried every combination but that one.
Thanks.


Reply With Quote