On Tue, Oct 10, 2006 at 08:52:31AM -0400, Andrew Witt wrote:
> I suggest using a shell function.  e.g., for bash you would
> do something like this in .bashrc in your home directory:

It's good idea, but it not works for me,
as function and as simple sh script.

% cat .bashrc | grep ls_dirs -A 3
ls_dirs()
{
    cls -l $@ | grep '^d'
}

% cat /home/user/bin/lsdirs
#!/bin/sh
ls_dirs $@

In shell environement we don't have cls command:
% lsdirs
bash: cls: command not found
% ls_dirs
bash: cls: command not found

And in lftp environement we don't have shell commands
% lftp media
[ftp] media:~> alias lsd "lsdirs"
[ftp] media:~> lsd
Unknown command `lsdirs'.
[ftp] media:~> !lsdirs
/home/user/bin/lsdirs: line 3: ls_dirs: command not found

Case with simple script body (cls -l $@ | grep '^d') also don't work.
(/home/user/bin/lsdirs: line 2: cls: command not found)

Any ideas?
-- 
Wbr, Stan S. Krupoderov
mailto:[EMAIL PROTECTED]

Reply via email to