Displaying 20 results from an estimated 61 matches for "find_file".
Did you mean:
find_files
2008 Dec 23
2
Bash Script for Beginners! oh dear :'(
...(and in each folder is two files, urls and
domains, standard stuff for web filtering!)
I have a script to search through
/some/directory/where/blacklist/is/stored and look at each text file
trying to find someblockedsite.com and remove it. This is as far as I
have got:
machine:/blacklistdir# sh ./find_files "blockedsite.com"
find_files is as follows:
#!/bin/bash
rm -f ./found_files
touch ./found_files
find . -exec grep -q "$1" '{}' \; -print >> ./found_files
i=1
while [ $i -le `wc -l ./found_files` ] ; do
grep -iv $1 $2 > $2.new ####This is where I am stu...
2020 Jan 27
2
Re: [PATCH 3/3] docs: don't perform lookup on absolute paths
...Golembiovský <tgolembi@redhat.com>
> ---
> podwrapper.pl.in | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/podwrapper.pl.in b/podwrapper.pl.in
> index f12a173f..1e4aa149 100755
> --- a/podwrapper.pl.in
> +++ b/podwrapper.pl.in
> @@ -689,6 +689,8 @@ sub find_file
> my $use_path = shift;
> local $_;
>
> + return $input if File::Spec->file_name_is_absolute($input) and -f $input;
Do you really need to use file_name_is_absolute? -f seems to work fine
also with absolute paths. In case the path is relative, -f will be fine
too, as.....
2019 Nov 26
0
[PATCH libguestfs 1/3] podwrapper: __INCLUDE:file.pod__ and __VERBATIM:file.txt__ in POD files.
...$path)}ge;
+
# There should be no =encoding line present in the content (we will add one).
die "$progname: $input: =encoding must not be present in input\n"
if $content =~ /^=encoding/m;
@@ -642,11 +682,29 @@ if ($text) {
#print "$progname: wrote $text\n";
}
+sub find_file
+{
+ my $input = shift;
+ my $path = shift;
+ local $_;
+
+ my @path = (".");
+ if ($path) {
+ push (@path, split (/:/, $path))
+ }
+ foreach (@path) {
+ return "$_/$input" if -f "$_/$input";
+ }
+ die "$progname: $input: c...
2016 Oct 05
4
[PATCH v2 0/2] Improve OVA manifest parsing
This series fixes and enhances parsing of the OVA manifest file.
The changes are:
- Added mandatory space to the regexp
- Process all lines in the file, not just one
- Warn on improperly formated lines
- Support SHA256 hashes
v1 -> v2: rebased on to master to make use of the Checksums module
Tomáš Golembiovský (2):
v2v: ova: fix checking of the manifest file
v2v: ova: support SHA256
2016 Sep 29
3
[PATCH 2/2] v2v: ova: support SHA256 hashes in manifest
...++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index 513fe30..5420c85 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -133,7 +133,7 @@ object
(* Read any .mf (manifest) files and verify sha1. *)
let mf = find_files exploded ".mf" in
- let rex = Str.regexp "SHA1(\\(.*\\))= \\([0-9a-fA-F]+\\)\r?" in
+ let rex = Str.regexp "SHA\\(1\\|256\\)(\\(.*\\))= \\([0-9a-fA-F]+\\)\r?" in
List.iter (
fun mf ->
debug "Processing manifest %s" mf;
@@ -142,2...
2017 Mar 13
0
[PATCH 1/2] v2v: -i ova: Hoist utility functions to the top of the file.
...)) in
+ let files =
+ filter_map (
+ fun f ->
+ if Filename.check_suffix f ".ovf" ||
+ Filename.check_suffix f ".mf" then Some f
+ else None
+ ) files in
+ untar ~paths:files file outdir
+
+(* Find files in [dir] ending with [ext]. *)
+let find_files dir ext =
+ let rec loop = function
+ | [] -> []
+ | dir :: rest ->
+ let files = Array.to_list (Sys.readdir dir) in
+ let files = List.map (Filename.concat dir) files in
+ let dirs, files = List.partition Sys.is_directory files in
+ let files =
+ List....
2020 Jan 27
1
Re: [PATCH 3/3] docs: don't perform lookup on absolute paths
...in | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/podwrapper.pl.in b/podwrapper.pl.in
> > > index f12a173f..1e4aa149 100755
> > > --- a/podwrapper.pl.in
> > > +++ b/podwrapper.pl.in
> > > @@ -689,6 +689,8 @@ sub find_file
> > > my $use_path = shift;
> > > local $_;
> > >
> > > + return $input if File::Spec->file_name_is_absolute($input) and -f $input;
> >
> > Do you really need to use file_name_is_absolute? -f seems to work fine
> > also with a...
2008 Jul 03
0
Error on Autotest start
...nd had a problem. I went back to 3.5.0 and
it worked. I stayed there until moving to rails 2.1. I again updated my gems
and got 3.10. This one had the same problem. This time I need to figure out
what is wrong. Here is what I get:
/Library/Ruby/Gems/1.8/gems/ZenTest-3.10.0/lib/autotest.rb:394:in
`find_files_to_test'': undefined method `values'' for #<Array:0x18b2530>
(NoMethodError)
from
/Library/Ruby/Gems/1.8/gems/ZenTest-3.10.0/lib/autotest.rb:239:in
`run_tests''
from
/Library/Ruby/Gems/1.8/gems/ZenTest-3.10.0/lib/autotest.rb:228:in
`get_to_green'...
2005 Feb 01
4
Shorewall problem
I am getting the following message when Shorewall stops can anybody shed
any light on this message and where I should be looking? Thanks
root@bobshost:~# shorewall stop
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Stopping Shorewall...Processing /etc/shorewall/stop ...
IP Forwarding Enabled
2016 Aug 08
1
[PATCH] sparsify, v2v: use Common_utils.absolute_path
...) in
(* Exploded path must be absolute (RHBZ#1155121). *)
- let exploded =
- if not (Filename.is_relative exploded) then exploded
- else Sys.getcwd () // exploded in
+ let exploded = absolute_path exploded in
(* Find files in [dir] ending with [ext]. *)
let find_files dir ext =
--
2.7.4
2020 Jan 27
5
[PATCH 0/3] Fixing out-of-tree builds
Building virt-v2v out-of-tree does not work and requires several small fixes
here and there.
Tomáš Golembiovský (3):
build: perform gnulib check from source directory
build: run ocaml-link.sh from build directory
docs: don't perform lookup on absolute paths
cfg.mk | 1 +
podwrapper.pl.in | 2 ++
v2v/Makefile.am | 16 ++++++++--------
3 files changed, 11 insertions(+), 8
2016 Sep 29
3
[PATCH 1/2] v2v: ova: fix checking of the manifest file
...put_ova.ml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index 4f848e2..513fe30 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -133,9 +133,10 @@ object
(* Read any .mf (manifest) files and verify sha1. *)
let mf = find_files exploded ".mf" in
- let rex = Str.regexp "SHA1(\\(.*\\))=\\([0-9a-fA-F]+\\)\r?" in
+ let rex = Str.regexp "SHA1(\\(.*\\))= \\([0-9a-fA-F]+\\)\r?" in
List.iter (
fun mf ->
+ debug "Processing manifest %s" mf;
let mf_folder...
2016 Oct 05
3
[PATCH v3 0/2] Improve OVA manifest parsing
This series fixes and enhances parsing of the OVA manifest file.
The changes are:
- Added mandatory space to the regexp
- Process all lines in the file, not just one
- Warn on improperly formated lines
- Support SHA256 hashes
v1 -> v2: rebased on to master to make use of the Checksums module
v2 -> v3:
- changed debug/warning messages in first patch according to Richard's
suggestions
2009 Oct 29
5
[PATCH] gfxboot.c32
Ok, here is the first try to turn the gfxboot wrapper into a com32 module. I
had to extend the interface to the gfxboot core a bit to get it working. So
it works only with latest gfxboot from
git://gitorious.org/gfxboot/gfxboot.git
Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfxboot_c32.diff.gz
Type: application/x-gzip
Size: 7220 bytes
Desc:
URL:
2016 Oct 05
4
[PATCH v4 0/2] Improve OVA manifest parsing
This series fixes and enhances parsing of the OVA manifest file.
The changes are:
- Added mandatory space to the regexp
- Process all lines in the file, not just one
- Warn on improperly formated lines
- Support SHA256 hashes
v1 -> v2: rebased on to master to make use of the Checksums module
v2 -> v3:
- changed debug/warning messages in first patch according to Richard's
suggestions
2003 Mar 23
12
Shorewall 1.4.1
This is a minor release of Shorewall.
WARNING: This release introduces incompatibilities with prior releases.
See http://www.shorewall.net/upgrade_issues.htm.
Changes are:
a) There is now a new NONE policy specifiable in
/etc/shorewall/policy. This policy will cause Shorewall to assume that
there will never be any traffic between the source and destination
zones.
b) Shorewall no longer
2005 May 31
11
More Tests for 2.4.0-RC2 - strange behaviour
...configpath
+ ''['' -z /etc/shorewall:/usr/share/shorewall '']''
+ VERSION_FILE=/usr/share/shorewall/version
+ ''['' -f /usr/share/shorewall/version '']''
++ cat /usr/share/shorewall/version
+ version=2.4.0-RC2
+ run_user_exit params
++ find_file params
++ local saveifs= directory
++ case $1 in
++ ''['' -n '''' -a -f /params '']''
++ saveifs=''
''
++ IFS=:
++ for directory in ''$CONFIG_PATH''
++ ''['' -f /etc/shorewall/params '']'...
2019 Dec 11
2
[PATCH 1/2] podcheck: __INCLUDE:file.pod__ and __VERBATIM:file.txt__ in POD files.
...file ("$1", use_path => 1)}ge;
+
# Run the tool with --long-options and --short-options.
my @tool_options = ();
open PIPE, "$tool --long-options |"
@@ -235,11 +253,27 @@ printf "$progname: $tool: checked $tool_options_checked tool options, $pod_optio
exit 0;
+sub find_file
+{
+ my $input = shift;
+ my $use_path = shift;
+ local $_;
+
+ my @search_path = (".");
+ push (@search_path, @paths) if $use_path;
+ foreach (@search_path) {
+ return "$_/$input" if -f "$_/$input";
+ }
+ die "$progname: $input: can...
2016 Oct 07
3
[PATCH v5 0/2] Improve OVA manifest parsing
This series fixes and enhances parsing of the OVA manifest file.
The changes are:
- Added mandatory space to the regexp
- Process all lines in the file, not just one
- Warn on improperly formated lines
- Support SHA256 hashes
v4 -> v5:
- fix tests
- change one test to include the SHA256 checksum
Tomáš Golembiovský (2):
v2v: ova: fix checking of the manifest file
v2v: ova: support SHA256
2019 Nov 26
4
[PATCH libguestfs 0/3] options: Describe --key SELECTOR in a single file.
The libguestfs part of this change.
Also a virt-v2v part will be needed.
The first patch adds a new feature to podwrapper so that we can use
__INCLUDE:file__ directives within the POD itself (instead of using
--insert, and one day replacing that).
The second patch shows how this change could be used for the included
parts of the guestfish man page, including the non-English pages under