On 12/4/18 9:35 PM, 積丹尼 Dan Jacobson wrote:
> Bob, I remember from my K&R Unix book that ls can be used in scripts.
> In fact that is why
> $ ls
> acts different than
> $ ls | cat
>
> Plus there are lots of things ls can do that find cannot.
>
> For instance sorting.
You didn't mention sorting i
OS: *Fedora*. Component: coreutils.x86_64 8.30-6.fc29 @System
Tail prints the first row in 'tail -n '
Command executed:
$ dnf repoquery --requires bash --recursive --resolve | grep -E
'.x86_64$|.noarch$' | tail -n 1
Last metadata expiration check: 0:28:25 ago on Wed Dec 5 11:09:16 2018.
tzdata-0
Fine. Put a message on top of (info "(coreutils) ls invocation")
saying that your pipes are better.
On Wednesday, December 5, 2018 11:51:09 AM CET Ricky Tigg wrote:
> OS: *Fedora*. Component: coreutils.x86_64 8.30-6.fc29 @System
>
> Tail prints the first row in 'tail -n '
>
> Command executed:
> $ dnf repoquery --requires bash --recursive --resolve | grep -E
> '.x86_64$|.noarch$' | tail -n 1
>
The output from stat(1) can be controlled, and is therefore easier
to parse than ls's human-friendly output, IMO.
Regards - Peter