Sponsored Content
Top Forums Shell Programming and Scripting Extract section of file based on word in section Post 302454752 by bartus11 on Monday 20th of September 2010 02:16:10 AM
Old 09-20-2010
If you don't need the "Normal backup" line then this can do:
Code:
virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"
for i in ${virtualMachines}; do awk "/$i/,/Duration/" /tmp/backup.log > vdrlog-$i; done

In case that this line is important for you, let me know I'll come up with some Perl.
This User Gave Thanks to bartus11 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed & awk--get section of file based 2 params

I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Discussion started by: Andy Cook
12 Replies

2. UNIX for Dummies Questions & Answers

how can i extract text section via grep

hi, i have a very long text file. i need to extract with grep command a certain part. for example text file include 1ooo rows: 1.... 2... 3... . . . 1000 i want to view with grep only rows 50-100. any ideas will be appreciated thanks... (8 Replies)
Discussion started by: meny
8 Replies

3. Shell Programming and Scripting

Search and extract by section from configuration

Hi, I understand either AWK or SED can do this, but I not sure how to extract the following configuration in section. Meaning when I need to find code with " ip helper-address 192.168.11.2" , it would start from "interface Serial0/0" and "interface FastEthernet0/1". Only displaying both section... (2 Replies)
Discussion started by: haphazard
2 Replies

4. Shell Programming and Scripting

Selecting A Section of A File Based On the Time Within It

Hi, I have a file formated like this: John 7.22 2010-01-25_17:01:36 George 8.22 2010-01-25_17:02:36 Bob 9.62 2010-01-25_17:04:36 Jane 10.11 2010-01-25_17:05:36 Emma 4.52 2010-01-25_17:01:36 What I want to do is cut out only the entries that have... (2 Replies)
Discussion started by: Donkey25
2 Replies

5. Shell Programming and Scripting

Format output from the file to extract "date" section

Hello Team , I have to extract date section from the below file output. The output of the file is as shown below. I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (4 Replies)
Discussion started by: coolguyamy
4 Replies

6. Shell Programming and Scripting

Deleting a section based on search from other file

Hi Everyone, I need some help to accomplish the below. help is highly appriciated. I have a 45 mb file with ldap entries. Each user entry is separated by a string # entry-id: 1 and so on. Some of the entries has a string xyz: true. I want to delete the section if the user section has xyz: true... (6 Replies)
Discussion started by: Samingla
6 Replies

7. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

8. Shell Programming and Scripting

Fetch a section from a file

Hi, I have a file like... $cat file1 +++++++++++++++++++ client1 +++++++++++++++++++++++++++++ col1 col2 col3 ------ ----- ----- (0 rows affected) ========================================================= +++++++++++++++++++ client1 +++++++++++++++++++++++++++++ col1 col2 col3... (6 Replies)
Discussion started by: sam05121988
6 Replies

9. Shell Programming and Scripting

Extract record from file based on section.

input file output file (1 Reply)
Discussion started by: lathigara
1 Replies

10. Shell Programming and Scripting

Copying section of file based on search criteria

Hi Guru's, I am new to unix scripting. I have a huge file with user details in it(file2) and I have another file with a list of users(file1). Script has to search a user from file1 and get all the associated lines from file2. Example: fiel1: cn=abc cn=DEF cn=xyx File 2: dn:... (10 Replies)
Discussion started by: Samingla
10 Replies
BACKUP_HELP(8)						       AFS Command Reference						    BACKUP_HELP(8)

NAME
backup_help - Displays help for backup commands SYNOPSIS
backup help [-topic <help string>+] [-admin] [-help] backup h [-t <help string>+] [-a] [-h] DESCRIPTION
The backup help command displays the complete online help entry (short description and syntax statement) for each operation code specified by the -topic argument. If the -topic argument is omitted, the output includes the first line (name and short description) of the online help entry for every backup command. To list every backup command whose name or short description includes a specified keyword, use the backup apropos command. OPTIONS
-topic <help string>+ Indicates each command for which to display the complete online help entry. Omit the backup part of the command name, providing only the operation code (for example, specify dump, not backup dump). If this argument is omitted, the output briefly describes every backup command. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The online help entry for each backup command consists of the following two or three lines: o The first line names the command and briefly describes its function. o The second line lists aliases for the command, if any. o The final line, which begins with the string "Usage", lists the command's options in the prescribed order. Online help entries use the same symbols (for example, brackets) as the reference pages in this document. EXAMPLES
The following example displays the online help entry for the backup dump command: % backup help dump backup dump: start dump Usage: backup dump -volumeset <volume set name> -dump <dump level name> [-portoffset <TC port offset>] [-at <Date/time to start dump>+] [-append] [-n] [-file <load file>] [-help] PRIVILEGE REQUIRED
None SEE ALSO
backup(8), backup_apropos(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_HELP(8)
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy