The find command -exec option requires that the list of tokens following it are terminated by a semicolon. The backslash is an escape that prevents the shell from interpreting the semicolon as a meta character (end of command).
See: https://www.ibm.com/docs/en/zos/2.1.0?topic=descriptions-find-find-file-meeting-specified-criteria On Mon, Jan 24, 2022, at 3:59 PM, Dave Barry wrote: > Is it possible the "\" is taken as an escape character? > > -----Original Message----- > From: IBM Mainframe Discussion List <[email protected]> On Behalf Of > ITschak Mugzach > Sent: Sunday, January 23, 2022 7:08 AM > To: [email protected] > Subject: [EXTERNAL] Chaining unix commands > > CAUTION! This email originated outside of the organization. Please do not > open attachments or click links from an unknown or suspicious origin. > > ====================================================================== > 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? > > ITschak Mugzach > *|** IronSphere Platform* *|* *Information Security Continuous Monitoring for > z/OS, x/Linux & IBM I **| z/VM coming soon * > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send email to > [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > Kirk Wolf Dovetailed Technologies http://dovetail.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
