Sponsored Content
Top Forums Shell Programming and Scripting Need to grep certain entry out of log file Post 302818523 by exm on Friday 7th of June 2013 04:17:07 PM
Old 06-07-2013
I assume I have to substitute "file" with the actual file name? This returns no rows:

Code:
$ sed -rn '/DIP-10219/ s/^.*[^,](cn=.*com).*$/\1/p' $MW_HOME/user_projects/domains/IDMDomain/config/fmwconfig/servers/*/dms_config.xml | while read CMD; do echo ldapdelete -h \$OIDHOST -p \$OIDPORT -D \$OIDUSER -w \$OIDPWD -c -v dn \"$CMD\"; done


Last edited by exm; 06-07-2013 at 05:50 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep table entry problem

Hi, I have a table which looks like this Line a b c 0 10 0 0 1 0 0 2 0 ... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

2. UNIX for Dummies Questions & Answers

grep for password file entry

How would I grep for password file entry without using grep 'username' /etc/passwd? perhaps with who? I want to create alias that will find the password file entry regardless of the user who is using it. I am trying to get the same exact line from the file entry like: Name : Password : UserID... (7 Replies)
Discussion started by: alis
7 Replies

3. UNIX Desktop Questions & Answers

How to grep for password file entry

How would I grep for password file entry without using grep 'username' /etc/passwd? perhaps with who? I want to create alias that will find the password file entry regardless of the user who is using it. Thanks (4 Replies)
Discussion started by: alis
4 Replies

4. UNIX for Dummies Questions & Answers

grep first occurrence but continue to next entry in patternfile

I have 1300 files (SearchFiles0001.txt, SearchFiles0002.txt, etc.) , each with 650,000 lines, tab-delimited data. I have a pattern file, with about 1000 lines with a single word. Each single word is found in the 1300 files once. If I grep -f PatternFile.txt SearchFiles*.txt >OutputFile.txt... (2 Replies)
Discussion started by: newhavendweeb
2 Replies

5. Shell Programming and Scripting

How to write a new entry at the beginning of a log file instead of at the end?

Hi Ladies and Gents, Explanation of my question with an example: Let's consider the script: backup_every_hour.sh #!/bin/bash rsync -auv $dir $backup_dir >> backup_every_hour_script.log Each time this script is called there will be a new entry at the end of the file... (1 Reply)
Discussion started by: freddie50
1 Replies

6. Shell Programming and Scripting

[awk] grep a part of filename as entry file

hi all, i need to combine these files into one csv file. Bounce_Mail_Event_Daily_Report_01_Jul_2012.csv Bounce_Mail_Event_Daily_Report_02_Jul_2012.csv Bounce_Mail_Event_Daily_Report_03_Jul_2012.csv Bounce_Mail_Event_Daily_Report_04_Jul_2012.csv... (10 Replies)
Discussion started by: makan
10 Replies

7. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

8. UNIX for Dummies Questions & Answers

How to grep for first entry in a file?

Hello friends, I have a question. Sometimes I have to search for an entry in a file that is repeated thousands of times. Can you tell me how to search so that i get limited results? For example: file: myfile.txt grep "hello world" myfile.txt this above grep will generate 5000... (4 Replies)
Discussion started by: DallasT
4 Replies

9. Shell Programming and Scripting

Selecting latest entry in the log file

Hi there I am trying to write a script where I will need to look for a specific word in the log file and I am aware this can be done by grep for example. As there will be multiple entries for this I want to grep the last one to enter the log... how would I go about this - would I have to use... (5 Replies)
Discussion started by: simpsa27
5 Replies

10. Shell Programming and Scripting

Monitor and capture the latest entry from the log file

Hi, I want to monitor a log file using tail -f command and search for a specific string on the most recent entry from the file. If the search string matches with the most recent or last line from the file, I want send an email to the people with the message. tail -f service.log|tail -n 1 ... (5 Replies)
Discussion started by: svajhala
5 Replies
defragcron(8)						      System Manager's Manual						     defragcron(8)

NAME
defragcron - Schedules AdvFS file domains for defragmenting SYNOPSIS
/usr/sbin/defragcron [-p] [-q] [-t nnn] [-b hh:mm] [-a hh:mm] [-l pathname] [domain...] /usr/sbin/defragcron [-p] [-q] [-t nnn] [-T mm] [-l pathname] [domain...] OPTIONS
Specifies that the domains are to be defragmented in parallel. If not specified, the default is to serially defragment the domains. Sup- press informational messages. If not specified, the default is to produce informational messages. Specifies the aggregate I/O performance threshold, the point at which the domain should be defragmented. A number from 1-100. If not specified, the default is to always defrag- ment the domain. The performance threshold is based on the value returned by the defragment -nv command. If this value is lower than or equal to the value specified here, the domain is defragmented. If specified, the utility will not run before this time and will return an error if the time is not yet reached. Specify time values using the 24-hour clock. If not specified, the default time is 01:00. If specified, the utility will not run after this time, and will return an error if the time has been passed. Specify time values using the 24-hour clock. If not specified, the default time is 05:00. Specifies an exact time interval, in minutes, for the defragment utility to run. If not specified, there is no default. If you use this option, its action overrides the before and after time checking of the -a and -b options. Specify the -l option to direct messages to log files in the specified directory. One log file is generated for nonspecific messages and separate log files are generated for each domain that is defragmented. If the option is not specified, the default action is to not produce log files for the messages (which then are directed to the standard output device). If the option is specified, you also must specify a pathname for the directory into which the log files are to be written. The default directory, as specified in the root crontab entry, is /usr/var/defragcron/. The names of the log files have the following format: domain1.log, domain2.log, ..., and so on, one file for each active domain, plus a file, defragcron.log for the nonspecific messages. If you have named a domain defragcron, messages for that domain are writ- ten to the nonspecific messages in the defragcron.log file. OPERANDS
Specifies one or more AdvFS file domains. If no domains are specified, the default action is for the utility to defragment all active AdvFS file domains. DESCRIPTION
The defragcron utility runs the defragment utility to a schedule that you specify on all active AdvFS file domains or on the active domains you specify. The typical use of this utility is to run it as a command in the cron daemon. See cron(8). Unless the domain is listed in the comand line, the utility does not attempt to defragment inactive file domains (those which have no mounted filesets). It can try to defragment file domains that have some mounted and some unmounted filesets. In this case, the utility fails. RESTRICTIONS
You must have root user privileges to run this utility. All restrictions for the defragment utility are in effect for the defragcron utility. EXIT STATUS
The utility returns a 0 (zero) on success. Otherwise, it returns a 1 and an error diagnostic. EXAMPLES
The following example defragments all active domains that have an aggregate I/O performance threshold less than or equal to 60 for an interval of 240 minutes: # /usr/sbin/defragcon -q -t 60 -T 240 FILES
The command's path. The path of the defragment utility. SEE ALSO
Commands: crontab(1), cron(8), defragment(8) defragcron(8)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy