[ale] windoze scripts to linux scripts
Michael Trausch
mike at trausch.us
Fri May 27 14:07:39 EDT 2011
I thought the goal was to ensure that the full path was listed. Using find
like that only works if you specify the whole path in $DIR, whereas realpath
will always return the full path. I use realpath quite a bit for other
things which is why using it came to mind.
--
Sent from my phone... a G2 running CM7 nightlies!
On May 27, 2011 1:59 PM, "Geoffrey Myers" <lists at serioustechnology.com>
wrote:
> I still don't understand what is wrong with a simple find:
>
> find $DIR -print
>
> Clean, and easy. No different the the OP's windows solution.
>
> James Sumners wrote:
>> Here's a bash script you can use without having to install any extra
>> packages. Note that 1) it is slow and 2) you run it like so:
>> `listpath.sh .`
>>
>> #!/bin/bash
>>
>> IFS=$'\n'
>>
>> for f in $(find ${1} -type f); do
>> DIR=$(dirname $(readlink -f ${f}))
>> NAME=$(basename ${f})
>>
>> echo "${DIR}/${NAME}"
>> done
>>
>> On Fri, May 27, 2011 at 12:23 PM, Michael Trausch <mike at trausch.us>
wrote:
>>> find . -print0 | xargs -0 realpath
>>>
>>> You might have to install the realpath package.
>>
>>
>
>
> --
> Until later, Geoffrey
>
> "I predict future happiness for America if they can prevent
> the government from wasting the labors of the people under
> the pretense of taking care of them."
> - Thomas Jefferson
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110527/9a9e4767/attachment.html
More information about the Ale
mailing list