Re: list files but not directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- On Sun, 8/23/09, Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx> wrote:

> From: Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx>
> Subject: Re: list files but not directory
> To: "Community assistance, encouragement, and advice for using Fedora." <fedora-list@xxxxxxxxxx>
> Received: Sunday, August 23, 2009, 12:26 PM
> Steven W. Orr wrote:
> > 
> > Two things!
> > 
> > 1. Bash syntax:
> > This will not work:
> > function lsp() { ls $@ && less }
> > If you do it in one line then it would have to be
> > function lsp() { ls $@ && less; }
> > 
> Yes - I did forget the ; at the end of the command. Bad
> morning...
> 
> > If you say ls && less then you will only run
> the less command if the ls
> > command succeeds with a 0 exit status. I know this was
> a typo but I just
> > didn't want others to get confused.
> > 
> I prefer not to have less run id ls exits with an error.
> That way,
> if I run something like lsd *.html on a directory with no
> .html


Why I can't run lsd?
Do I need to install any package?

-bash: lsd: command not found










> files in it, I do not have to type the q to exit less.
> 
> > *NEVER* use $@ without using double quotes. It is very
> bad luck and failure to
> > follow this advise will cause you to send 200 copies
> of stupid jokes to all
> > the people you know with aol addresses. And worse, you
> will end up knowing
> > more aol people.
> > 
> Oops - definitely a good point!
> 
> > What's the difference between an alias and a function?
> Simple: If you need to
> > pass arguments then use a function. I mention this
> because it's another of
> > those basic sources of confusion.
> > 
> I nice explanation.
> 
> Mikkel
> -- 
> 
>   Do not meddle in the affairs of dragons,
> for thou art crunchy and taste good with Ketchup!
> 
> 
> -----Inline Attachment Follows-----
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


      __________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux