At 02:35 PM 6/30/99 +0100, James Fidell <[EMAIL PROTECTED]> wrote:
>Quoting Richard Sharpe ([EMAIL PROTECTED]):
>
>> 3.1b Which one of the following is the correct command to
>> store all of the contents of all files in the
>> present working directory (or pwd) into a single new file called
>> 'all_in_one'?
>> a cat * > all_in_one
>> b cp * all_in_one
>> c cat * >> all_in_one
>> d All of the above
>>
>> C is given as the correct answer, but it seems clearly wrong. If all_in_one
>> already exists, then its contents will be appended with the contents of the
>> other files.
>
>I assumed that the phrase "new file" meant that it didn't already exist,
>in which case either A or C should be acceptable.
>
>If the file does already exist, then a will truncate the existing file
>and c won't, and both give an error message.
Hmmm, well, I tried it on TurboLinux 3.4.0, and did not get an error.
I guess that I mis-understood the question, and now consider it to be
ambiguous. There is definitely no need for the >> as well.
>I'd agree that C shouldn't be the correct answer for this.
>
>James.
>--
> "Yield to temptation -- | Consultancy: [EMAIL PROTECTED]
> it may not pass your way again" | http://www.cloud9.co.uk/james
> |
> - Lazarus Long | James Fidell
>
>
>________________________________________________________________________
>This message was sent by the linux-cert-program mailing list. To unsubscribe:
>echo unsubscribe | mail -s '' [EMAIL PROTECTED]
>
Regards
-------
Richard Sharpe, [EMAIL PROTECTED], NS Computer Software and Services P/L,
Samba (Team member www.samba.org), Ethereal (Team member www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
________________________________________________________________________
This message was sent by the linux-cert-program mailing list. To unsubscribe:
echo unsubscribe | mail -s '' [EMAIL PROTECTED]