On Mon, 24 Jan 2022 21:59:53 +, Dave Barry wrote:
>Is it possible the "\" is taken as an escape character?
>
You came in late, but didn't read further in the conversation
to where the OP said that he was using "find ... -exec ... \; "
Yes, "\" escapes the ";" as a shell token. And find requ
anuary 23, 2022 7:08 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: [EXTERNAL] Chaining unix commands
>
> CAUTION! This email originated outside of the organization. Please do not
> open attachments or click
Is it possible the "\" is taken as an escape character?
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
ITschak Mugzach
Sent: Sunday, January 23, 2022 7:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Chaining unix commands
CAUTION! This email
Peter, the names supplied were just to demonstrate the need...
ITschak Mugzach
*|** IronSphere Platform* *|* *Information Security Continuous Monitoring
for z/OS, x/Linux & IBM I **| z/VM coming soon *
On Mon, Jan 24, 2022 at 10:50 AM Peter Sylvester
wrote:
> On 24/01/2022 06:28, Itschak Mu
On 24/01/2022 06:28, Itschak Mugzach wrote:
Sorry: find / -name *.txt -exec echo {}; echo {} >> all.txt ; cat {} >>
all.txt \;
find / -name '*.txt' -exec sh -c 'echo {}; echo {} >> all.txt ; cat {}
>>all.txt' \;
might worlk, (but as already said, all.txt is probably not the best choice for
On Mon, 24 Jan 2022 07:28:24 +0200, Itschak Mugzach wrote:
>Sorry: find / -name *.txt -exec echo {}; echo {} >> all.txt ; cat {}
>>>all.txt \;
>
I doubt that you want to search the entire filesystem, "/".
Note that "all.txt" might be both input and output which may be undesirable.
Then:
534
Sorry: find / -name *.txt -exec echo {}; echo {} >> all.txt ; cat {} >>
all.txt \;
This doesn't work with or without quotes.
*| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere
Platform* *|* *Information Security Continuous Monitoring for Z/OS, zLinux
and IBM I **| *
*|* *Em
On Mon, 24 Jan 2022 07:17:17 +0200, Itschak Mugzach wrote:
>Example: ls *.txt -exec echo {}; echo {} >> all.txt ; cat {} >> all.txt \;
>
"ls" has no such operand as "-exec". Are you thinking of a "find" command?
-- gil
--
For I
sing.
> >
> >
> > --
> > Shmuel (Seymour J.) Metz
> > http://mason.gmu.edu/~smetz3
> >
> >
> > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
> behalf of ITschak Mugzach [imugz...@gmail.com]
> > Se
ERV.UA.EDU] on behalf of
> ITschak Mugzach [imugz...@gmail.com]
> Sent: Sunday, January 23, 2022 7:08 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Chaining unix commands
>
> I am trying to chain some commands by using a primary command -exec
> subcommand1; subcommand2; \;
>
&g
: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of
ITschak Mugzach [imugz...@gmail.com]
Sent: Sunday, January 23, 2022 7:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Chaining unix commands
I am trying to chain some commands by using a primary command -exec
subcommand1; subcommand2; \;
On Sun, 23 Jan 2022 16:18:11 +0200, ITschak Mugzach wrote:
>Gil, it works find for one level -exec of find command. I want it to run
>more commands by chaining.
>
Ah! You hadn't mentioned "find" earlier. Something such as:
501 $ find . -name x -exec sh -c 'ls -ld {}; wc {}' \;
-rw-r--r-- 1
Gil, it works find for one level -exec of find command. I want it to run
more commands by chaining.
ITschak
ITschak Mugzach
*|** IronSphere Platform* *|* *Information Security Continuous Monitoring
for z/OS, x/Linux & IBM I **| z/VM coming soon *
On Sun, Jan 23, 2022 at 4:16 PM Paul Gilmarti
On Sun, 23 Jan 2022 14:08:02 +0200, ITschak Mugzach wrote:
>I am trying to chain some commands by using a primary command -exec
>subcommand1; subcommand2; \;
>
>for some reason, uss doesn't see the ending (slashed) semicolon. In order
>to ignore the confusion, I also tried
>
Please be very liiter
I am trying to chain some commands by using a primary command -exec
subcommand1; subcommand2; \;
for some reason, uss doesn't see the ending (slashed) semicolon. In order
to ignore the confusion, I also tried
primary command -exec subcommand1 && subcommand2 && ... &&\; with no
success. Any ideas?
15 matches
Mail list logo