|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Edit file using terminal
Hey,
I'm new to Mac and OS X - how would I go about editing an existing file, and writing a string to it just using terminal, and preferably without installing any addons to achieve this functionality? Thanks for your time, -Ross [edit] I should also mention, I need to pass the contents of the file in as arguments, not open up an editor then have to type them in... Last edited by Invalid02 : June 21st, 2007 at 10:16 AM. |
|
#2
|
|||||
|
|||||
|
well you probably would have gotten a faster response if you asked this in the Linux forum as its the same answer
anyways, some text editors that are preinstalled on a Mac are pico and emacs, if you don't want a text editor (sounds like you just want to script this), but since you said you don't want an editor there are a few options if your just adding a line to the end of the file this will work bash Code:
if you need something else then you need to explain your situation better, to me it almost sounds like your looking to patch a file (and would need diff/patch) or your trying to edit a file which may be better suited for sed/awk
__________________
Feed ME |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Mac Help > Edit file using terminal |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|