bug-coreutils
[Top][All Lists]
Advanced

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

[COREUTILS] dirname line commands


From: Warren Crossing
Subject: [COREUTILS] dirname line commands
Date: Fri, 21 Jul 2006 10:48:25 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

hello,

i tried this simple command today to find all asterisk directories

locate asterisk | xargs dirname | sort | uniq

dirname: too many arguments
Try `dirname --help' for more information.
dirname: too many arguments
Try `dirname --help' for more information.
dirname: too many arguments
Try `dirname --help' for more information.
dirname: too many arguments
Try `dirname --help' for more information.
dirname: too many arguments
Try `dirname --help' for more information.
dirname: too many arguments
Try `dirname --help' for more information.


instead i had to get jiggy and issue

for i in `locate asterisk` ; do dirname $i ; done | sort | uniq

why doesn't dirname eat the stdin from xargs ( i tried a bunch or xargs switches -d and -e to no avail.)

here are some system details

uname -a
Linux splice 2.6.16-rc4 #9 PREEMPT Thu May 4 11:30:04 NZST 2006 i686 GNU/Linux

dpkg -l coreutils
||/ Name           Version        Description
+++-==============-==============-============================================
ii  coreutils      5.96-5         The GNU core utilities

much respect

warren
+61423164826




reply via email to

[Prev in Thread] Current Thread [Next in Thread]