|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
Appending errors and output to the same file
Hello,
I am using this to write the output and errors to one file. Quote:
That works fine, but if I try to append to the same using the below given syntax, i am getting an error Quote:
The error is : unexpected token & What is the correct syntax to use? Thank you.
__________________
What you get is either what you desired or what you deserved. Death seems to be such an abominable thing, but do we really want to live for ever? |
|
#2
|
||||
|
||||
|
Try:
Code:
$ php geo5.php 2>&1 > geo5.log
__________________
|
|
#3
|
|||
|
|||
|
I want to append the output to an existing file. If I am not wrong the command you gave will erase the previous contents of the file.
|
|
#4
|
||||
|
||||
|
Then just use the append operator instead of the overwrite operator:
Code:
$ php geo5.php 2>&1 >> geo5.log |
|
#5
|
|||
|
|||
|
Thank you. That worked.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Appending errors and output to the same file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|