david <[email protected]> writes:

> Q1. why does sed lose the first line?
>
> da...@david:~/test$ cat blah
> the quick
> brown fox jumps
> over
> the lazy
> dog
> da...@david:~/test$ cat blah | while read line ; do sed s/t/T/ ; done
> brown fox jumps
> over
> The lazy
> dog
> da...@david:~/test$

The first line is read by 'read line', setting the variable 'line' to "the
quick".  Subsequent to that the sed command reads the rest of the input,
prints it, then terminates.  The next iteration of read returns false, exiting
the loop.

Try this for clarity:
    cat blah | while read line ; do echo "loop: "; sed s/t/T/ ; done

> Q2. what does the @ mean?
>
> da...@david:~$ date -d @1174306440
> Mon Mar 19 23:14:00 EST 2007

The value is in seconds since the epoch, but I can't find any documentation
about the specific meaning of it.

Regards,
        Daniel
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to