Is this a valid command? find ./ -name bash.bashrc | cat
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The cat command concatenates the File to standard out (stdout), or in your case it concatenates the standard input (stdin) to standard out. That why it doesn't really read the file but just prints to stdout what it get in on stdin.
If that is going to have any posability to work you will have to use back quotes (`)
Back quotes will be substituted with the output of the command. That would be exactly like the first posted command and we are back at square one.
Go with phoenix answer it works. Belive us or try.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
I think I used backticks on my keyboard (maybe the font shows them wrong). I don't dispute phoenix's way -- but mine has nine letters less (if I discerned the blank spaces correctly).
What I still don't understand is why he wants to do it that way. I mean since he is in ./ he could just have typed
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
As I understand it it's just syntax . I mean the output from one program has to be kept in memory and handed to the next program in both instances. Perhaps one of the moderators / gurus can enlighten us further. Hello? Anybody listening?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.