Strange bash piping method that actually does work. And fixing hard disk partitions with fsck.

This is a strange bash piping method that actually does work. This pipes the output of one echo command and appends it to another.

homer@neo:~$ echo "Hello World" >| echo "Me" > out.txt
My laptop needing fsck.

My laptop needing fsck.

You should not use this syntax in reality; but this is an interesting trick nonetheless. This is an interesting photograph. I booted up my Debian 7.0 laptop today and it had a problem with the /dev/sda1 partition. I typed the root password and ran the fsck /dev/sda1 command to fix the issue. This can happen from time to time; but it not too hard to fix when you have experience with Linux. There are more examples of usage for the fsck command here: My example only required me to run the command and then use Ctrl-D to to exit the shell and this then re-booted my laptop and then the problem was fixed.

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *