hi guys,
I want to do pattern matching with awk or sed but I don't know how. here's what I want:
I have a line number for a pattern that I have already found using grep, and I know a pattern like "---" that happens a few lines above that certain line number. I want to print out the chunk... (1 Reply)
Hello friends,
I have a C source code containing sql statements. I use the following sed command to print all the sql blocks in the source code....
sed -n "/exec sql/,/;/p" Sample.cpp
The above sed command will print the sql blocks based on the pattern "exec sql" & ";"... (2 Replies)
Hi,
I have a situation where I want to replace some occurrences of ".jsp" into ".html" inside a text file.
For Example:
If a pattern found like <a href="http://www.mysite.com/mypage.jsp"> it should be retained.
But if a pattern found like <a href="../mypage.jsp"> it should be changed to... (4 Replies)
My goal is to make a script to find/replace the variable "PORT" with a unique number.
Like the following
<VirtualHost 174.120.36.236:PORT>
ServerName architect.com.ph
ServerAlias www.architect.com.ph
DocumentRoot /home/architec/public_html
ServerAdmin... (16 Replies)
Hi ,
My file have data like
4:ALMOST NEVER PR 1925836
5:NEVER PR W DDA 5857610
6:NEVER PR WO DDA 26770205
but i want to replace the spaces before last numric digits out put should be like this
4:ALMOST NEVER PR=1925836
5:NEVER PR W DDA=5857610
6:NEVER PR WO... (7 Replies)
Hi
I have written a shell script which used sed code below
sed -i 's/'"$Pattern"'/ /g' $FileName
I want to count the length of Pattern and replace it with equal number of spaces in the FileName.
I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
I have a sample text format as given below
<Text Text_ID="10155645315851111_10155645333076543" From="460350337461111" Created="2011-03-16T17:05:37+0000" use_count="123">This is the first text</Text>
<Text Text_ID="10155645315851111_10155645317023456" From="1626711840902323"... (3 Replies)
Discussion started by: my_Perl
3 Replies
LEARN ABOUT CENTOS
backup_dbverify
BACKUP_DBVERIFY(8) AFS Command Reference BACKUP_DBVERIFY(8)NAME
backup_dbverify - Checks the integrity of the Backup Database
SYNOPSIS
backup dbverify [-detail] [-localauth]
[-cell <cell name>]
[-help]
backup db [-d] [-l] [-c <cell name>] [-h]
DESCRIPTION
The backup dbverify command checks the integrity of the Backup Database. The command's output indicates whether the Backup Database is
damaged (data is corrupted) or not. If the Backup Database is undamaged, it is safe to continue using it. If it is corrupted, discontinue
any backup operations until it is repaired.
CAUTIONS
While this command runs, no other backup operation can access the Backup Database; the other commands do not run until this command
completes. Avoid issuing this command when other backup operations are likely to run. The backup savedb command repairs some types of
corruption.
OPTIONS -detail
Reports the number of orphaned blocks found, any inconsistencies, and the name of the server machine running the Backup Server that is
checking its copy of the database.
-localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to
the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more
details, see backup(8).
-cell <cell name>
Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8).
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
The command displays one of the following two messages:
Database OK
The database is undamaged and can be used.
Database not OK
The database is damaged. You can use the backup savedb command to repair many kinds of corruption as it creates a backup copy. For
more detailed instructions, see the OpenAFS Administration Guide chapter about performing backup operations.
The -detail flag provides additional information:
o The number of orphan blocks found. These are ranges of memory that the Backup Server preallocated in the database but cannot use.
Orphan blocks do not interfere with database access, but do waste disk space. To free the unusable space, dump the database to tape by
using the backup savedb command, and then restore it by using the backup restoredb command.
o Any inconsistencies in the database, such as invalid hostnames for Tape Coordinator machines.
o The name of the database server machine on which the Backup Database was checked, designated as the "Database checker". For a detailed
trace of the verification operation, see the /var/log/openafs/BackupLog file on the indicated machine. You can use the bos getlog
command to display it.
EXAMPLES
The following command confirms that the Backup Database is undamaged:
% backup dbverify
Database OK
The following command confirms that the Backup Database is undamaged and that it has no orphan blocks or invalid Tape Coordinator entries.
The Backup Server running on the machine "db1.abc.com" checked its copy of the Database.
% backup dbverify -detail
Database OK
Orphan blocks 0
Database checker was db1.abc.com
PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged
onto a server machine as the local superuser "root" if the -localauth flag is included.
SEE ALSO BackupLog(5), backup(8), backup_restoredb(8), backup_savedb(8), bos_getlog(8)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 BACKUP_DBVERIFY(8)