I'm trying to use a pipeline with cd
and ls
like this:
ls -l | cd /home/user/someDir
but nothing happens.
And I tried:
cd /home/user/someDir | ls -l
It seems that the cd
command does nothing while the ls -l
will work on the current directory.
The directory that I'm trying to open is valid.
Why is that? Is it possible to pipe commands with cd
/ ls
?
Didn't have any problem with other commands while using pipe.