redirection of awk print to a file
Posted
by
sushil kumar
on Stack Overflow
See other posts from Stack Overflow
or by sushil kumar
Published on 2011-11-22T11:30:07Z
Indexed on
2011/11/22
17:50 UTC
Read the original article
Hit count: 270
I can get the cpu Mhz of a solaris machine by following command.
% /usr/sbin/psrinfo -v | grep operate |head -1 | awk '{print $6}'
1200
when I run the following command, awk output is not getting redirected.
% csh -cf "/usr/sbin/psrinfo -v | grep operate |head -1 | awk '{print $6}' > myoutput"
% cat myoutput
The sparcv9 processor operates at 1200 MHz,
how to get following result
% cat myoutput
1200
© Stack Overflow or respective owner