Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKalidh Mohamed
5,995 PointsConsole freezes when I type the command nano hi.txt | grep "this"
so the pipe symbol is used to pipe commands together. But when I try to use the output of nano hi.txt to grep, the console freezes up
nano hi.txt | grep "this"
3 Answers
Gunhoo Yoon
5,027 PointsIt actually pipes something called stdout to stdin. So the operands must know how to send it and take it. In this case, nano probably won't send its output to terminal and your pipe is trapped somewhere in the middle. Try less or cat instead of nano less is probably more pleasant way to read documents in terminal.
Kalidh Mohamed
5,995 PointsI just tried this, but this time, it does nothing. It just goes to the next line on the prompt.
Gunhoo Yoon
5,027 PointsTried what? less hi.txt | grep this ?
Kalidh Mohamed
5,995 PointsI just figured it out. What I was searching for was in lower case compared to what was in the file. Can't believe I overlooked something so silly :(