I have a file that that contains output of some command.
# cat input.txt
*******************************************************************************
deinstall PREVIEW: deinstall operation will not actually occur.
*******************************************************************************
+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...
FAILURES
--------
Filesets listed in this section failed pre-deinstall verification
and will not be removed.
Dependency Failures
(Deinstall Operation)
---------------------
SELECTED FILESETS: The following is a list of filesets that you asked to
remove. They cannot be removed until all of their dependent filesets
are also removed. See subsequent lists for details of dependents.
my.data.list 6.1.2.0 # This is my data list...
INSTALLED DEPENDENTS: The following filesets are dependents of one or more
of the selected filesets listed above. These must be removed before
or with the filesets that you selected. To remove these dependents with
the selected filesets, specify the option to automatically remove dependent
software (-g flag).
apple.fruit 6.1.9.200 # This is apple...
ball.object 6.1.9.200 # This is ball
bat.object 6.1.9.200 # This is bat
cat.animal 6.1.9.200 # this is cat
nut.object 6.1.9.200 # this is nut
hut.house 6.1.9.200 # this is hut
<< End of Failure Section >>
FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 FAILED pre-deinstall verification
----
0 Total to be deinstalled
******************************************************************************
End of deinstall. No deinstall operation has actually occurred.
******************************************************************************
I am trying to get/print the list of installed dependents
apple.fruit 6.1.9.200 # This is apple...
ball.object 6.1.9.200 # This is ball
bat.object 6.1.9.200 # This is bat
cat.animal 6.1.9.200 # this is cat
nut.object 6.1.9.200 # this is nut
hut.house 6.1.9.200 # this is hut
I have gone through this How to select lines between two patterns? link. And has come up with this command but it is not working.
What am i doing wrong here?
awk '/"software (-g flag)."/ f; /"<< End of Failure Section >>"/{f=0}' input.txt