Sponsored Content
Top Forums Shell Programming and Scripting Need way to grep the following output in bold Post 303014431 by rovf on Monday 12th of March 2018 09:50:42 AM
Old 03-12-2018
Quote:
Originally Posted by jaapar
I was looking to find a write an if statement and schedule it in cron for every 15 minutes.
???? But I explained in my answer three choices you have for this, didn't I?

Still, I find the solution proposed by RudiC better.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to underline/bold and how to align output

Hi, I work with AIX 5 and have two basic questions: 1) How do I underline/bold a word in a text output? Any way to do it with echo command? basic example: echo "FOLDER " >> folder.txt ( I wish the word FOLDER to be underlined and bold). 2) Suppose I have the following pipe delimited... (1 Reply)
Discussion started by: clara
1 Replies

2. Shell Programming and Scripting

output of grep

hi, why the following is giving entire /etc/passwd file as output even when it does not contain ^ or $ . grep ' ' /etc/passwd whereas the following is not giving any output grep ' ^$ ' /etc/passwd (3 Replies)
Discussion started by: useless79
3 Replies

3. Shell Programming and Scripting

GREP with contain output

How can I perform a grep and it will give me a contain word (maintenance) instead of a string or the whole line of info. grep with exclusive output? or is there a CONTAIN with IF statement ? I have a file call yast2_vhost.conf and it contain multiple entries call maintenance.html... (2 Replies)
Discussion started by: yoom@hostwebase
2 Replies

4. UNIX for Dummies Questions & Answers

Help with grep output

Hello, I have a list of stings that I'm using with grep to determine which files contain the strings. Here's what I have now: list of strings in a file (list.txt): /directory/direc tory/file.jsp /dire ctory/directory/direct ory/file.jsp grep I'm doing to find files that contain the... (4 Replies)
Discussion started by: upstate_boy
4 Replies

5. Shell Programming and Scripting

grep output

From below mentioned line,i have to display output as last word only ie:arch_1_105366_720809746.dbf -rw-r----- 1 oracle dba 98887680 02 Mar 12:01 arch_1_105366_720809746.dbf Please .. (5 Replies)
Discussion started by: Sanal
5 Replies

6. Shell Programming and Scripting

grep output

hi i am running grep -c on a bunch of files some of which may be non existent. The output i get is in the same order as the files grep checks and this is what i want as i need to copy the output to a spreadsheet. However when i tried to pipe the output to sed to strip away the filenames and just... (5 Replies)
Discussion started by: chronics
5 Replies

7. Shell Programming and Scripting

output text in bold font using SED

hi I want to write a script, while using the SED editor, to output the text, in this case a variable, to the result file but highlighted it in bold, is it possible to do that? can you tell me how? eg. in text.txt sed '$ a\ '$variable' ' <text.txt >text2.txt so it will add the... (2 Replies)
Discussion started by: piynik
2 Replies

8. Shell Programming and Scripting

How to grep the desired output and output to a file?

currently I have process from a raw file to this stage ALTER TABLE "EXCEL_ADMIN"."TC_TXN_VOID" ADD CONSTRAINT "PK_TC_TXN_VOID" PRIMARY KEY ("TC_TXN_IID") ALTER TABLE "EXCEL_ADMIN"."TC_TXN_AMT" ADD CONSTRAINT "PK_TC_TXN_AMT" PRIMARY KEY ("TC_TXN_AMT_IID") ALTER TABLE... (10 Replies)
Discussion started by: jediwannabe
10 Replies

9. UNIX for Dummies Questions & Answers

How to have the output in grep?

Hi guys - I am trying to have a certain file display information horizontally divided by a pipe. for example file name: foo.dat has information like this: name1 name2 name3 namenamename4 namene5 I would like it to display like this: name1|name2|name3|namenamename4|namene5 ... (6 Replies)
Discussion started by: DallasT
6 Replies

10. UNIX for Beginners Questions & Answers

Grep output

Hi. I have a command line that will generate exif data from .jpg files... So to get the Camera Model I use: find -iname "*.jpg" -print0 | xargs -0 exiftool -a | grep "Camera Model" But I want the file name AND the camera model... How to I get the grep to give me TWO bits of information from... (2 Replies)
Discussion started by: TuftyDave
2 Replies
CHANGETRACK(1)						      General Commands Manual						    CHANGETRACK(1)

NAME
changetrack - track changes to files SYNOPSIS
changetrack [-h] [-c configfile] [-d directory] [-e] [-r] [-q] [-m message] [-M message] [-v] [-u] [-o toaddress] [-f fromaddress] DESCRIPTION
changetrack is a program to monitor changes to a bunch of files. If files are modified one day, and the machine starts working incorrectly some days later, changetrack can provide information on which files were modified, and help locate the problem. Normally changetrack uses ed to keep track of various revisions of the files by maintaining an .ed script with the change history for each file. Alternatively, changetrack can use rcs to keep track of various revisions of the files. Each file is "installed" in the rcs system the first time that changetrack is run after that file is added to the config file. Whenever changetrack is run after that, a copy of the file is made, which is 'checked in' and implicitly 'checked out' of the rcs system. See the man page of co for information on retrieving an old version of the file. Backup files (ending in tilde ~) are ignored, unless explicitely included. After each pattern in the file list, adding white space, a colon (:) then more whitespace, followed by email addresses, separated by more whitespace, will result in the changes to that file being emailed to that address. All changes from each run are expressed in one email. Using the email feature requires Mail::SendMail to be installed; if it does not work correctly, an error message will be printed to stan- dard error. OPTIONS
-h Display a short help message then exit. -cconfigfile Get the list of files to track from configfile instead of from ~/.changetrackrc (/etc/changetrack.conf for the super-user) -doutputdirectory Store output in outputdirectory instead of in ~/.changetrack/ (/var/lib/changetrack/ for the super-user) -e Keep a copy of the file from when it was first added to the changetrack configuration, and keep ed -styled changes to rebuild the file. This option is recommended only if rcs does not work on the machine. To recover using this means, the .ed file should have the last several commands removed, to allow the file to be rebuilt to the appropriate state. A command like 'cat myfile.ed | ed myfile.original' should be executed. -r Disable the rcs facility. -q Quiet mode; only print critical messages. Good for scripts. -mmessage Print message on each file, after checking for any changes. Good for indicating reboots or other system events. -Mmessage Like -m, but message is only printed on modified files. -v Print version and exit. -u Use unified diffs (this only works with some implementations of diff. -oemailaddress Mail output to emailaddress. This is supplementary to emails specified in the config file. -femailaddress Set "From" header to emailaddress, which must be fully qualified. REQUIREMENTS
This program requires diff. Unless the -r switch is used, this program requires rcs to be installed. If the -e switch is used, ed is required. FILES
~/.changetrackrc List of files to monitor. Each line may start with '#' indicating a comment. If a line is not a comment, it contains a file/pattern to monitor, and optionally " : " followed by any email addresses to send changes to. The filename may be a pattern described in the same way as for ls. Note: the default is /etc/changetrack.conf for root. ~/.changetrack/ Default directory in which to store output information. The default is /var/lib/changetrack/ for root. All rcs files are stored in this directory, unless a subdirectory called RCS exists, in which case the rcs files are stored in that directory. /etc/cron.daily/changetrack Script that creates the list of all files monitor. /etc/cron.hourly/changetrack Script that invocates changetrack. /etc/default/changetrack Configuration for the above two scripts. DIAGNOSTICS
Each filename is written to standard output. rcs will print errors if certain things go wrong. It will also print a few lines each time changetrack is run after a new file is added to the configuration. IDENTIFICATION
Author: Cameron J. Morland. Manual Page Revision: 2.1 Release Date: 2001-03-06. Copyright (C) 2001-2005 Cameron J. Morland. Changed by Jens Peter Secher to reflect the Debian modifications. SEE ALSO
ed(1), rcsintro(1), co(1) TODO
Automate removal of out-of-date changes, to save disk space and clarify the important changes. BUGS
None known. CHANGETRACK(1)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy