When I run gcc -v I'd like to output the results to a text file.I thought something like gcc -v > ~/defaultGCC.txt would store the version output but it does not.I also tried gcc -v | tee ~/defaultGCC.txt | more And that didn't work...The following:gcc -v | tee ~/defaultGCC.txt | >gcc -v | tee ~/defaultGCC.txt | >>both throw errors 
Output GCC Version Results to File
pipe;version;tee
gcc -v is not responsible for version infomation, but rather programs which are invoked by the compiler while gcc --version is responsible for displaying gcc's version to standard output. If this is what you want, then gcc --version | tee ~/defaultGCC.txt will work. However, if the output of gcc -v is what you actually want, then gcc -v &> ~/defaultGCC.txt will give you exactly what you want.