I have been teaching myself bash scripting and I wanted to write a script that makes a txt file with specific hardware information. I figured that 'grep' would be a great tool for pulling the info I wanted from /proc and other places.
My issue is the output is doubled. What am I doing wrong?
$ grep "Mhz" /proc/cpuinfo cpu MHz : 1200.000 cpu MHz : 1200.000 $ cat /proc/cpuinfo | grep "MHz" cpu MHz : 1200.000 cpu MHz : 1200.000
....I do understand that the commands above will not redirect into my txt file. I am trying to get the command to output what I want before redirecting.