You can not use variable or command substitution as a command. Try

fortune -a | fmt -80 -s | echo (shuf -n 1 -e cowsay cowthink) -(shuf -n 1
-e b d g p s t w y) -f (shuf -n 1 -e (cowsay -l | tail -n +2)) -n | .

I do not have fortune/cowsay/cowthink to test. This should work, but can
break embedded parentheses.

Maxim

On Sun, 17 Feb 2013 12:38:57 +0900, Hormatzhan Yiltiz <hyil...@gmail.com>
wrote:

> I found this fancy greeting from ArchWiki[1], after a little adjsutment:
>
> fortune -a | fmt -80 -s | (shuf -n 1 -e cowsay cowthink) -(shuf -n 1 -e  
> b d
> g p s t w y) -f (shuf -n 1 -e (cowsay -l | tail -n +2)) -n
>
> But fish says:
> fish: Illegal command name '(shuf -n 1 -e cowsay cowthink)'
>
> Compiled this git version on x64 Debiain Testing:
> commit 4416753df0116452891f6c389712b60b4ea219b6
> Author: ridiculousfish <corydo...@ridiculousfish.com>
> Date:   Sat Feb 16 02:38:13 2013 -0800
>
> fish --version
> fish, version 2.0.0
>
> I think the code should work, but why the error?
> ​[1] https://wiki.archlinux.org/index.php/Bash
>
> ​Best
> ,
> ========================
> He who is worthy to receive his days and nights is worthy to receive* all
> else* from you (and me).
>                                                  The Prophet, Gibran  
> Kahlil
> Gibran

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to