File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
can variables be used as pattern for awk command?
Joined: Dec 06, 2011
Dec 13, 2011 05:05:21
I wanted to know if we can use the variable as a
for awk command as shown below:
$c = "Dec Tue";
$log = `awk '/\$c/' in.txt`;
I have to search for a pattern in $c occuring in file in.txt.
Thanks in advance.
Joined: Oct 02, 2003
Dec 13, 2011 07:18:57
What happened when you tried it?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: can variables be used as pattern for awk command?
How to read each line from file in Shell script
split function problem in AWK
whats the error!
Inserting character/editing huge file on unix
use of variables in awk to search for pattern from a file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014