I'm a greenhorn at bash scripting. I have a file called dir.txt storing this text:
./src/defaultPackage
how do I read dir.txt and switch to directory ./src/defaultPackage in one line?
I've tried cat ./dir.txt | xargs cd but cd throws no such file or directory error