On Thu, Aug 19, 2010 at 9:29 PM, Matt <[email protected]> wrote: > Its seems running find in a subshell may cause the error.
What's the error? > My bash script is: > > file=\ > $(find ... ...;\ > find ... ...;\ > find ~/tmp.bib) > > What is the correct method to assign the results of several "finds" > to a bash variable "file"? This works for me: $ file=$(find /etc/cron.daily/ ; find /etc/cron.d/ ) $ echo $file Although that works in this specific case, in the general case you may run into some subtle issues, most notably too many entries or files with spaces or other special characters. Regards, - Robert -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup
