|
|
find within a sh script
i am currently doing this
HEAP=`/usr/bin/find / -type f -name heap*.phd -newer $JOB_MARK -print
2>/dev/null`
i now have a new requirment to find 3 different files. i'd like to keep
it very very simple so if i could change heap*.phd to reflect the 3
unique names that would be great
1. core
2. javacore*
3. heapdump*
Thanks
|
|
0
|
|
|
|
Reply
|
dunphyj (6)
|
3/9/2005 3:15:43 PM |
|
jdunphy wrote:
>
> i am currently doing this
> HEAP=`/usr/bin/find / -type f -name heap*.phd -newer $JOB_MARK -print
> 2>/dev/null`
Quote that star by bracketing the word in double-quotes
or using a backslash.
> i now have a new requirment to find 3 different files. i'd like to
keep
> it very very simple so if i could change heap*.phd to reflect the 3
> unique names that would be great
> 1. core
> 2. javacore*
> 3. heapdump*
\( -name core -o -name javacore\* -o -name heapdump\* \)
That clause in the place of your -name clause.
Find is the sysadmin's wonder program. Any sysadmin will
find it a week well spent to study the use of find until
they can dash off expressions, combine with xargs and so
on.
|
|
0
|
|
|
|
Reply
|
Doug
|
3/9/2005 5:42:29 PM
|
|
|
1 Replies
112 Views
(page loaded in 0.091 seconds)
Similiar Articles: /bin/sh: Local variables in a function ? - comp.unix.solaris ...All variables within a shell (ignoring things like subshells) have the same scope. ... But I rarely write pure /bin/sh scripts any more. You either have a ksh or the /bin/sh ... importing functions from an external bash script - comp.unix.shell ...I tried source functions.sh as I would do at the terminal but source command cannot be found from within the script protocol.sh. thanks in advance, Tom retrieve script name - comp.lang.awkThe reason why I want this is to call the corresponding function within the script ... pass the name of the shell script to the awk program, e.g. #!/bin/sh awk -f script ... I want to run a binary from inside a ksh script - comp.unix ...The error message I > get is: > > InventoryXmlReport.sh -t I -s 2004 > ld ... DISPLAY env. in script. - comp.sys.sun.admin I want to run a binary from inside a ksh script ... Execute Bash script using Cygwin - comp.soft-sys.matlabSay the script is "MyScript.sh". It executes with > > system('C:\cygwin\bin ... Hi All, I am trying to execute a shell script from within python.. This shell script takes ... how to simulate press "spacebar, enter, esc keys" at the unix ...i have a script called "script1.sh" for auto-telnet to a cisco router and ... at the ... i have a script called "script1.sh" for ... comp.unix ... ... inside a ksh script ... /usr/local/bin/stty: not found - comp.lang.tclWhen I try and run even the simplest Expect script, I get the error: sh ... first item in my path, and I have tried setting the PATH environment inside my Expect script ... ksh debugging - comp.unix.solarisHello, I have been using "sh -x script_name" to debug shell script (ksh) on ... I want to run a binary from inside a ksh script - comp.unix ... ksh debugging - comp.unix ... execute shell script from python, needs sys.argv - comp.lang ...Hi All, I am trying to execute a shell script from within python.. This shell script ... alternatively, I could put the shell command in its own file, say fastx.sh ... Execute command within AWK - comp.lang.awk... echo hello")}' > hello > $ awk 'BEGIN{print "echo hello" | "/bin/sh ... script - comp.lang.awk AWK command help - comp.lang.awk AWK command inside the shell script ... Bourne Shell Programming - Ooblick.comThere are a number of commands that aren't part of sh, but are often used inside sh scripts. These include: basename. basename pathname prints the last component of pathname: Unix & Linux: Find Multipule files within a unix sh script ...programming.itags.org: Unix & Linux question: Find Multipule files within a unix sh script, created at:Wed, 30 Apr 2008 15:30:00 GMT with 264 bytes, last updated ... 7/29/2012 10:06:44 PM
|
|
|
|
|
|
|
|
|