06-08-2003
"space asterisk" means zero or more spaces. "space space asterisk" means a space followed by zero or more spaces.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
I'd like to remove files which is returned by the following statement
ls -l arch*.dbf|grep "`date|cut -c5-10`" (cut -c5-10 =Mar 20)
To achive this,I tried the following statments but none worked ..
rm < `ls -l arch*.dbf|grep "`date|cut -c5-10`"`
rm `ls -l arch*.dbf|grep... (8 Replies)
Discussion started by: luft
8 Replies
2. Shell Programming and Scripting
I have a file in which I clean out a bunch of nonsense text as well as path information.
What I end up with is something like the following:
johnson.........................................................933
Where the periods represent the whitespace
The file comes out originally with... (2 Replies)
Discussion started by: roninuta
2 Replies
3. Shell Programming and Scripting
Dear all,
I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..)
I have tried with the command
find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \;
but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies
4. Shell Programming and Scripting
Hi,
Say I have this text file <copy.out> that contains a list of files/directories to be copied out to a different location.
$ more copy.out
dir1/file1
dir1/file2
dir1/file3
"dir1/white space"
dir1/file4
If I do the following:
$copy=`more copy.out`
$echo $copy
dir1/file1... (4 Replies)
Discussion started by: 60doses
4 Replies
5. Shell Programming and Scripting
i have a directory that have files that contains word "spam", how can i remove all those files which have word spam.
This code help me in searching
find ./ -type f -exec grep -l "spam" {} \;
How i will add removing option with it. If some one have good suggestion regarding searching... (2 Replies)
Discussion started by: learnbash
2 Replies
6. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
7. Shell Programming and Scripting
Hi,
I have a file with rows like below delimited with pipe (|)
I want to remove all the leading and trailing white space from each and every fields keeping the delimiter intact.
I have tired this
sed 's/*//g;s/*$//g'
but the result is incorrect
it is removing a whitespace from... (6 Replies)
Discussion started by: COD4
6 Replies
8. UNIX for Dummies Questions & Answers
How do you delete/remove multiple files ? (5 Replies)
Discussion started by: nosuchluck
5 Replies
9. UNIX for Dummies Questions & Answers
Hi Gurus,
we are planning to clear the old log files based on the year and i need help on this and i searched in google and i came up with the scripts but i am stuck with this.
(1) wroks fine
How many files exist in based on the extension
find -type f | sed -e 's/.*\.//' | sort | uniq... (1 Reply)
Discussion started by: SeenuGuddu
1 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script.
script was return as follows.
find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f
find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
LEARN ABOUT CENTOS
pmdainstance
PMDAINSTANCE(3) Library Functions Manual PMDAINSTANCE(3)
NAME
pmdaInstance - return instance descriptions for a PMDA
C SYNOPSIS
#include <pcp/pmapi.h>
#include <pcp/impl.h>
#include <pcp/pmda.h>
int pmdaInstance(pmInDom indom, int inst, char *name, __pmInResult **result, pmdaExt *pmda);
cc ... -lpcp_pmda -lpcp
DESCRIPTION
pmdaInstance uses the standard PMDA(3) data structures to return information concerning the instance domain indom.
The result structure is constructed by pmdaInstance and will contain one or more instance names and/or identifiers as specified by the inst
and name arguments.
If inst has the value PM_IN_NULL and name is a null string, result will contain all the instances names and identifiers in the instance do-
main.
If inst is PM_IN_NULL but name is the name of an instance in the instance domain indom, then result will contain the instance identifier
for instance name. Note that if name contains no spaces, partial matching up to the first space in the instance name is performed, i.e.
``1'' will match instance name ``1 minute''. If name contains an embedded space, then no partial matching is performed and name should
match one of the instance names exactly.
If name is a null string but inst is an instance identifier in the instance domain indom, then result will contain the name for instance
inst. The result structure is allocated with malloc(3) and should be released by the caller with free(3).
DIAGNOSTICS
If any errors occur during the execution of pmdaInstance, the result structure is deallocated. If the instance domain indom is not sup-
ported by the PMDA, pmdaInstance will return PM_ERR_INDOM.
If the inst or name does not correspond to any instances in the indom domain, pmdaInstance will return PM_ERR_INST.
CAVEAT
The PMDA must be using PMDA_INTERFACE_2 or later, as specified in the call to pmdaDSO(3) or pmdaDaemon(3).
Because of optional partial matching up to the first space in the instance name, the PMDA developer should ensure that if instance names
are allowed to have spaces, the names are unique up to the first space.
SEE ALSO
malloc(3), PMAPI(3), PMDA(3) and pmGetInDom(3).
Performance Co-Pilot PCP PMDAINSTANCE(3)