Hey guys. If I'm in a directory with only one directory, for example:
foo@bar:/$ ls
really-complicated-or-long-dir-name
Why wouldn't piping this single line of output into cd work?
foo@bar:/$ ls | cd
I'm just getting started with the shell and I was trying to navigate into a directory with a long and complicated name. I've since learned about the tab autocompletion (which is awesome), but I'm still interested in the mechanics of why this situation doesn't work.
Any ideas?