Hi all!
I am confused as to how an old-good UNIX command, like
cat text.txt > new_tex.txt
can be used in PHP.
I tried
system (" cat text.txt > new_text.txt");
but it didn't work, the file new_text.txt was left blank.
Am I doing something wrong with the > ???
Must I use something else instead of 'system' ?
the > in UNIX
Page 1 of 11 Replies - 1529 Views - Last Post: 02 November 2005 - 03:09 PM
Replies To: the > in UNIX
#2
Re: the > in UNIX
Posted 02 November 2005 - 03:09 PM
try this, it might work.
hth
<?php
echo '<pre>';
$last_line = system('cat text.txt > new_tex.txt', $retval)
echo '
</pre>
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
?>
hth
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|