Sponsored Content
Top Forums UNIX for Dummies Questions & Answers sed print certain lines matching variable Post 302482028 by ctsgnb on Monday 20th of December 2010 12:06:34 PM
Old 12-20-2010
--- removed ---

Last edited by ctsgnb; 12-20-2010 at 01:09 PM.. Reason: oops
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I want to print next 3 lines after pattern matching.

Dear Experts, I have file called file1 in which i am greping a pattern after that i want to next 3 lines when that pattern is matched. Ex:- file1 USA UK India Africa Hello Asia Europe Australia Hello Peter Robert Jo i want to next 3 lines after matching Hello... (12 Replies)
Discussion started by: naree
12 Replies

2. Shell Programming and Scripting

How to print file without few exactly matching lines?

Hi I have a very long file with 4 columns of numbers for example 1875 1876 12725 12723 13785 13786 4232 4230 13184 13185 ... (2 Replies)
Discussion started by: ananyob
2 Replies

3. Shell Programming and Scripting

AIX equivalent to GNU grep's -B and -A [print lines after or before matching lines]

Hi folks I am not allowed to install GNU grep on AIX. Here my code excerpt: grep_fatal () { /usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP" } Howto the same on AIX based machine? from manual GNU grep ‘--after-context=num’ Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

4. Shell Programming and Scripting

Print matching lines in a file

Hello everyone, I have a little script below: die "Usage infile outfile reGex" if @ARGV != 3; ($regex) = @ARGV; open(F,$ARGV) or die "Can't open"; open(FOUT,"+>$ARGV") or die "Can't open"; while (<F>) { print FOUT if /$regex/.../$regex/; } No matter what I give $regex on the... (2 Replies)
Discussion started by: new bie
2 Replies

5. Shell Programming and Scripting

print lines between 2 matching patterns

Hi Guys, I have file like below, I want to print all lines between test1231233 to its 10 occurrence(till line 41) test1231233 qwe qwe qweq123 test1231233 qwe qwe qweq23 test1231233 qwe qwe qweq123 test1231233 qwe qwe qweq123131 (3 Replies)
Discussion started by: jagnikam
3 Replies

6. Shell Programming and Scripting

Look up between 2 files and print matching lines

Hi, I have 2 large log files in .gz format file 1 contains abcde 12345 23456 . . . . . . . . 09123 (8 Replies)
Discussion started by: aravindj80
8 Replies

7. Shell Programming and Scripting

How to print all the lines after pattern matching?

I have a file that contains... Number -------------------- 1 2 3 4 i want to print all the numbers after the hyphen ... (6 Replies)
Discussion started by: ankitknit
6 Replies

8. Shell Programming and Scripting

Compare file1 for matching line in file2 and print the difference in matching lines

Hello, I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies

9. Shell Programming and Scripting

Want to print out lines with a matching pattern from file

Hi all, I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found. I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line. fgrep -o... (2 Replies)
Discussion started by: MonikaB
2 Replies

10. Shell Programming and Scripting

Print lines after matching two pattern

would like to print everything after matching two patterns AAA and BBB. output : CCC ZZZ sample data : AAA BBB CCC ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
rmfset(8)						      System Manager's Manual							 rmfset(8)

NAME
rmfset - Removes a fileset or a clone fileset from an AdvFS file domain SYNOPSIS
/sbin/rmfset [-f] domain fileset OPTIONS
Turns off the message prompt. OPERANDS
Specifies the name of an existing AdvFS file domain. Specifies the name of the fileset to be removed from the specified file domain. DESCRIPTION
The rmfset command removes a fileset (and all of its files) from an existing AdvFS file domain. Unless you use the -f option, you are prompted with the following request before a fileset is removed: rmfset: remove fileset <filesetname>? [y/n] If you answer n, the fileset is not removed. If you answer y, the fileset is removed. The -f option is useful for scripts or when you do not want to be queried about each fileset. If you choose the -f option, no prompts are displayed. The rmfset command operates as if you responded yes to the prompt. Unmount a fileset before removing it with the rmfset command. RESTRICTIONS
A fileset or clone fileset cannot be removed with this command if it is mounted. A fileset that has a clone fileset cannot be removed with this command until the clone fileset has been removed. You must be the root user to use this command. An rmfset operation can hang if you attempt to remove a fileset and the target AdvFS domain is experiencing heavy I/O. To work around the restriction, avoid using the utility on busy AdvFS domains. EXAMPLES
The following example deletes the test_fset fileset from the test_domain file domain. In this example, the test_fset fileset is mounted on the /mnt3 directory: # umount /mnt3 # rmfset test_domain test_fset rmfset: remove fileset test_fset? [y/n] y # SEE ALSO
Commands: mkfset(8), showfdmn(8), showfsets(8), mount(8) Functions: advfs_rmfset(3) File Formats: advfs(4) rmfset(8)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy