Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Enclosing one-liner in a bigger loop - unix

by baxy77bax (Deacon)
on Apr 24, 2015 at 08:59 UTC ( [id://1124500]=note: print w/replies, xml ) Need Help??


in reply to Re: Enclosing one-liner in a bigger loop - unix
in thread Enclosing one-liner in a bigger loop - unix

Ok, this is embarrassing. Thank you though... And the answer is yes

UPDATE:

Attempt to save the post.(Though I'll probably embarrass my self one more time)

How would one do this if one would like to know what was matched in each file .
Let the expected output be :

file1: match match match file two: match match ...
the same as grep function does. (Ano no, I don't want to use grep since I cannot hash)

Replies are listed 'Best First'.
Re^3: Enclosing one-liner in a bigger loop - unix
by Eily (Monsignor) on Apr 24, 2015 at 09:13 UTC

    Look at $ARGV which contains the current file name.

    And you could avoid the eskimo kiss if you want with something like: perl -lne '/^([^\t]*)\t/ and not $h{$1}++ and print $1'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1124500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (9)
As of 2024-03-28 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found