I am new to shell scripting and need some help. I googled, but couldn't find a similar scenario.
Basically, I need to rename a datafile. This is the scenario -
I have a file, readonly.txt that has 2 columns - file# and name.
I have another file,missing_files.txt that has id and name. Both the... (3 Replies)
Dear awk users,
I am trying to use awk to match records across two moderately large CSV files. File1 is a pattern file with 173,200 lines, many of which are repeated. The order in which these lines are displayed is important, and I would like to preserve it. File2 is a data file with 456,000... (3 Replies)
Hi all,
I'm new to this forum and bash scripting. I have the following problem, I need to copy some files (from one dir. to another) whose first 5 numbers (subjects' ID) match the directory names. Here a shortened version of what I'm trying to do:
names=(32983_f 35416_f 43579_f) # these are... (6 Replies)
Hi,
I'm a newbie at programming in Unix, and I seem to have a task that is greater than I can handle. Trying to learn awk by the way (but in the end, i just need something that works). My goal is to compare two files and output the difference between the two. I've been reading, and I think I... (5 Replies)
Greetings Unix exports,
I am facing some problems in combining files with different name patterns with a directory and I would appreciate if you can help me
I have more than 1000 files but they follow a specific pattern of naming. e.g. 64Xtest01.txt
They are divided into two sets of test and... (9 Replies)
Hi,
I need help to find matched patterns in 30 files residing in a folder simultaneously. All these files only contain 1 column. For example,
File1
Gr_1
st-e34ss-11dd
bt-wwd-fewq
pt-wq02-ddpk
pw-xsw17-aqpp
Gr_2
srq-wy09-yyd9
sqq-fdfs-ffs9
Gr_3
etas-qqa-dfw
ddw-ppls-qqw... (10 Replies)
Hi
I'd like to add the newline:
\tuser: nobody", or "<TAB>user: nobody
to all files named:
docker-compose.ymlin subfolders of pwd with names beginning with 10-20.
Within these files, I'd like to find the line (there'll only be one) containing:
command: celery workerNOTE: As far as... (2 Replies)
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Hello.
For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Hi,
I need help to match patterns from between two different files and extract region of strings.
inputfile1.fa
>l-WR24-1:1
GCCGGCGTCGCGGTTGCTCGCGCTCTGGGCGCTGGCGGCTGTGGCTCTACCCGGCTCCGG
GGCGGAGGGCGACGGCGGGTGGTGAGCGGCCCGGGAGGGGCCGGGCGGTGGGGTCACGTG... (4 Replies)
Discussion started by: bunny_merah19
4 Replies
LEARN ABOUT DEBIAN
file::find::rule::procedural
File::Find::Rule::Procedural(3pm) User Contributed Perl Documentation File::Find::Rule::Procedural(3pm)NAME
File::Find::Rule::Procedural - File::Find::Rule's procedural interface
SYNOPSIS
use File::Find::Rule;
# find all .pm files, procedurally
my @files = find(file => name => '*.pm', in => @INC);
DESCRIPTION
In addition to the regular object-oriented interface, File::Find::Rule provides two subroutines for you to use.
"find( @clauses )"
"rule( @clauses )"
"find" and "rule" can be used to invoke any methods available to the OO version. "rule" is a synonym for "find"
Passing more than one value to a clause is done with an anonymous array:
my $finder = find( name => [ '*.mp3', '*.ogg' ] );
"find" and "rule" both return a File::Find::Rule instance, unless one of the arguments is "in", in which case it returns a list of things
that match the rule.
my @files = find( name => [ '*.mp3', '*.ogg' ], in => $ENV{HOME} );
Please note that "in" will be the last clause evaluated, and so this code will search for mp3s regardless of size.
my @files = find( name => '*.mp3', in => $ENV{HOME}, size => '<2k' );
^
|
Clause processing stopped here ------/
It is also possible to invert a single rule by prefixing it with "!" like so:
# large files that aren't videos
my @files = find( file =>
'!name' => [ '*.avi', '*.mov' ],
size => '>20M',
in => $ENV{HOME} );
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2003 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Rule
perl v5.12.4 2011-09-19 File::Find::Rule::Procedural(3pm)