Search Results

Search: Posts Made By: Daniel M. Clark
Forum: OS X (Apple) 02-15-2009
20,933
Posted By Daniel M. Clark
Success! I ran: tr -d '\r' <...
Success!
I ran:

tr -d '\r' < readyToProcess.txt > ready2.txt

on my datafeed file, then:


(echo '0a'; echo 'first line of text'; echo '.'; echo 'wq') | ed -s ready2.txt

and all is well....
Forum: OS X (Apple) 02-15-2009
20,933
Posted By Daniel M. Clark
New development... I found this line of code...
New development...
I found this line of code and figured that if cat wasn't going to cooperate, I'll just put my first line right into the script:

(echo '0a'; echo 'first line of text'; echo '.';...
2,337
Posted By Daniel M. Clark
Absolutely perfect, thank you! I changed the file...
Absolutely perfect, thank you! I changed the file names, plugged it into my script and got exactly what I was looking for - and even better, I think I understand how it works. I love learning new...
Forum: OS X (Apple) 02-14-2009
20,933
Posted By Daniel M. Clark
cat FirstLine.txt|echo >> new.txt results in...
cat FirstLine.txt|echo >> new.txt

results in an empty text file... am I reading your advice correctly?
Forum: OS X (Apple) 02-14-2009
20,933
Posted By Daniel M. Clark
Also - I ran printf "\n" >> FirstLine.txt and the...
Also - I ran printf "\n" >> FirstLine.txt and the result was the same as when I open the file in TextWrangler and add the new line manually. Oddly, when I cleared that new line and ran printf "\r" >>...
Forum: OS X (Apple) 02-14-2009
20,933
Posted By Daniel M. Clark
I was hoping you wouldn't say that ;) See, I...
I was hoping you wouldn't say that ;) See, I figured there must be some trick or something, because when I simply add a new line like that (by opening in TextWrangler and hitting Enter at the end of...
Forum: OS X (Apple) 02-14-2009
20,933
Posted By Daniel M. Clark
Ah-ha. Okay, I think I'm onto something... I...
Ah-ha. Okay, I think I'm onto something... I spent some time researching the line terminator thing (have been since last night actually) but everything I came up with kept telling me that my line...
2,337
Posted By Daniel M. Clark
Complicated(?) text file comparison
I've got two files, both plain text. Each file is a datafeed of products, pipe delimited. The current file is in directory 1 and yesterday's file is in directory 2 (literally, those are the directory...
Forum: OS X (Apple) 02-14-2009
20,933
Posted By Daniel M. Clark
Cat command not working as expected
I've been trying to figure this out since last night, and I'm just stumped. The last time I did any shell scripting was 8 years ago on a Unix box, and it was never my strong suit. I'm on a Mac...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy