Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jynxxander

macrumors member
Original poster
Sep 7, 2008
30
0
Sure echo -n (text) let's you output something in a new line, but is there anyway to make that line the first line in a txt document?
 
Hmm, that's odd. I can't think of an easy way to do it with a single command. What exactly are you trying to set up here?

By the way, echo -n outputs text that does not have a line break after.
 
It's actually for an applescript for Geektool.
Anyway, I found something

Code:
cat FILE | pbcopy && echo "TEXT" > FILE  && pbpaste >> FILE
:D
 
Hmm, I'll have to remember that one. I was going to recommend something similar, but I would've had to use a temporary file, which would be pretty messy.
 
I don't know of a method, but just did a bit of searching, and found a workaround that may suit your needs.

Open the file, and grab the contents currently there. Then file append to add whatever you need to add. Then re-insert the old contents below.

You've probably seen this, but in case you haven't...
 
I don't know of a method, but just did a bit of searching, and found a method that may suit your needs.

Open the file, and grab the contents currently there. Then file append to add whatever you need to add. Then re-insert the old contents below.

You've probably seen this, but in case you haven't...

I've already found something, but thanks for your suggestion.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.