Need to pull this highlighted strings irrespective of line numbers & should be echoed . But these strings are from Outfile from different dir. In which way this can be grepped ?? Need an idea
http-timeout 120 seconds
persistent-timeout 180 seconds
host-rewriting on
silence-warning off
compression off
include-response-type-encoding off
always-show-errors off
disallow-get off
[Services](config http Firewall)# [Services](config http Firewall)# admin-state enabled
ip-address LocalIP
summary admin-state
priority normal
port 9091
http-timeout 120 seconds
persistent-timeout 180 seconds
host-rewriting on
silence-warning off
compression off
include-response-type-encoding off
always-show-errors off
disallow-get off
disallow-empty-reply off
persistent-connections on
client-address X-Client-IP
httpproxy-port 800
version HTTP/1.1 HTTP/1.1
chunked-uploads off
monitor-processing-policy terminate-at-first-throttle
debug-mode off
debug-history 25
type loopback-proxy
attachment-byte-count 2000000000 bytes
attachment-package-byte-count 0 bytes
external-references forbid
[Services](config http Firewall)# [Services](config)# Overwrite previously saved configuration? [y/n]: Configuration saved successfully.
[Services](config)# [Services]# Goodbye
If you would want to grep out using regex, then you should have to have some relationship between all the data which you want. Then only you can pull it off ?!
Desired Output
./routing.sh tmox3456 enable
*******************************************************
Preparing to service the request for Device tmox3456 in Question . . .
*******************************************************
Request authenticated
Enabling the Device in few seconds
Report Logging . .
Wed Feb 3 22:10:44 CST 2010
admin-state enabled or disabled
Overwrite previously saved
Configuration saved successfully.
Goodbye
For the admin-state the argument is either enable or disable which is there in the log.
Rest is also the tail of the logs.