Huge thanks, your explanatory skills are impressive indeed. I went online only now after several days of intensive brainwork I tried to go through on my own and was only astonished that we share the similar understanding.
I think I may nailed the essence of my problem of why I was unable to filter out unneeded entries. After failing numerous tests trying to search just for the entries I wanted to be skipped instead of trying to actually I stumbled upon the fact that I had missed the logic when using
in that it output no results when I tried to feed it as an argument to
parameter in the combination with
. I bypassed an obvious thing which was that 1) expressions of the type
can NOT be arguments to
,
and 2) nor it coexist with any other parameters than
because it was what the name of the parameter's implies - "a regular extension of the Extended Set" - it could NOT be used to do what I sought not in conjunction with it.
So the correct logic of this part of the command line was
. Use of -path and -regex on the same line with Extended Set regexes was like comparing incomparable. By further investigation I discovered that I could not make much of use of
or pipe into either
or
, cause grepping is useful mostly for manipulating strings in target files or in output of such commands as
so I dropped that option.
I looked closely at description of
once more and it was this phrase that caught my attention and made into my enlightenment:
Quote:
It causes findto not descend into the current file
.
So this is what I needed: to omit the entire pathname and get only the highest level for every matched result according to the pattern. It meant I had append this option to the command line without any following constructs. Having tested with simpler instances I glanced through the man page and threw in
to omit constant "/dev/fd 3: not a directory" lines.
So, to sum the entire line that I struggled to come up with to do the task had to be:
Notice that the argument to -path is NOT a regular expression of the extended set with which you'd use -E option to
necessary to provide if
is used too. In this case it conforms to the logic nicely and assists in the required manner.
That way I was able to reduce the output to only 5 lines, "sandboxing" that app in the search results that I then had opportunity to apply further actions to.
Last edited by scrutinizerix; 01-24-2018 at 09:14 PM..
Problem: I have a shell script that will be called by a Perl module that will connect to a db and delete rows. The Perl module will be called by CRON. I am using a Perl module to call a shell script because I need to get the db connection from Perl.
Here is the Perl pseudocode:
... (4 Replies)
Dear all
I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that.
What I actually want from this shell script is that it will move all the files one by one to another server which can be... (2 Replies)
i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables...
here is what i where i am now...
# a bunch of initializition steps are here ...... (1 Reply)
Hi,
I want to check if file(s) exist even in subdirectories and perform an action. After searching here couldn't find solution that would work, but made my own solution that works fine:
if
then
echo
egrep "$1|$2|$3" `find| grep MLOG`
else
echo "MLOG does not exist"
fiThat will check... (1 Reply)
I tried with sed command to create a space between namespace from the XML file. I used this syntax. Can someone tell me is this syntax is vaild?
/usr/xpg4/bin/sed -e 's/<\/^.*><^.:Errort>/<\/^.*> <^.:Errort>/g' test > test2
I dint find any changes or any space being created between... (10 Replies)
file contents looks like this :
#START
line1 of record1
line2 of record1
#END
#START
line1 of record2
line2 of record2
line3 of record2
#END
#START
line1 of record3
#END
my question how should i make it a records between #START and #END .
willl i be able to get the contents of the... (5 Replies)
Hi,
I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
I have a file name :
var=UsrAccChgRpt
I want to make them upper case.
Tried:
$var | tr
Error:
tr: Invalid combination of options and Strings.
Usage: tr | -ds | -s | -ds | -s ] String1 String2
tr { -d | -s | -d | -s } String1
Could you please help. I am using AIX... (2 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)
Hello,
Using Bash on Mac OS X 10.7.5 (Lion). I downloaded a GrowlSafari plugin for Webkit from its GitHub page GitHub - uasi/growl-safari-bridge: GrowlSafariBridge enables arbitrary javascript (including Safari Extensions) to notify via Growl.. In the description it says that after installing for... (0 Replies)