The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Saving output from awk into a perl variable
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Saving output from awk into a perl variable
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
10-08-2008
userix
Registered User
Join Date: May 2008
Posts: 21
Saving output from awk into a perl variable
How would I pass awk output to a
perl
variable?
For example, I want to save the value in the 4th column into the variable called test. My best guess is something as follow, but I am sure this isn't correct.
Code:
$test = system("awk '/NUMBER/{print \$4}' $_");
userix
View Public Profile
Find all posts by userix
Find userix's past nominations received
Find userix's present nominations given