Sponsored Content
Top Forums Shell Programming and Scripting Eliminating space constraint in grep Post 302588472 by vivek d r on Monday 9th of January 2012 04:56:25 AM
Old 01-09-2012
Eliminating space constraint in grep

here in the below code just a space between 'Info' and '(' is showing that the patter doesnt match...
Code:
 echo "CREATE TABLE Info  (" | grep -i "CREATE TABLE Info  (" | wc | awk -F' ' '{print $1}'
1
echo "CREATE TABLE Info (" | grep -i "CREATE TABLE Info  (" | wc | awk -F' ' '{print $1}'
0

is there any way we could make it not to consider space as a difference...
 

8 More Discussions You Might Find Interesting

1. AIX

Eliminating paging space and interpreting memory utilization

I just want to inquire on one of our DB Servers. Currently, we are running on 26GB of memory and 6 CPUs. Though our memory is 70-80 utilized, I can see some paging of around 8-10%. Is there any effective way we can lessen/eliminate paging? Here is our current VMO Settings: vmo: ... (1 Reply)
Discussion started by: depam
1 Replies

2. Shell Programming and Scripting

Unique constraint violated within stored procedure executed from Perl

Hi! I got an strange trouble executing a stored procedures that goes inserting line by line on a table. I mus integrate it with perl for an specific task... the hole process is controlled by e Perl script that: Load a text file calling sqlldr. Call a stored procedure that process the... (2 Replies)
Discussion started by: jparra
2 Replies

3. Shell Programming and Scripting

How to grep space?

Hi, I want to know how to grep space. Eg: input file contains 1565432 432 546 3514432 432 545 6541332 432 354 5464412 565 355 8456145 546 534 5632465 432 654 From this i need output of the lines which has 432 which are bold. My requirement is whenever 432 comes... (3 Replies)
Discussion started by: rakeshbharadwaj
3 Replies

4. Shell Programming and Scripting

search and replace combination of two words...with a constraint

Hi I have 100 files in my directory. Please help me how to do in Unix or any other scriptin lanuages. I want to replace all occurances of "goutham" to goutham_ind ONLY if the file contains the word "goutham" with the word "engineer"; for eg----test1 is a file contains the following inf; goutham... (6 Replies)
Discussion started by: nandugo1
6 Replies

5. Shell Programming and Scripting

awk: Eliminating white space while setting variable

Hi, I have a large flat file from host without delimiter. I'm transforming this file to a csv file using statements like # Row 03: Customer / field position 3059 +20 WOFABNAM=substr( $0, 3059, 20 ); and deleting the trailing whitespaces before and after with that sub( /^ +/, "",... (4 Replies)
Discussion started by: Celald
4 Replies

6. UNIX for Advanced & Expert Users

[SOLVED] LDAP Constraint Violation while changing password

Hello there, I hope that I am posting in the right section here, please advise if I posted wrong. I currently try to change passwords in our Active Directory Envoirenment via LDAP on Linux since the users in question do not have access to a windows-machine and we want to keep it that way. ... (0 Replies)
Discussion started by: henryford
0 Replies

7. Solaris

ORA-00001: unique constraint violated

Am trying to install a account script in oracle 8i and I keep getting ORA-00001: unique constraint violated as the screen shot below shows so am wondering how do i fix this i have posted the full code that is the issue. i hope some one can help me, thanks a lot http://www.livve.com/sqlbug.jpg... (2 Replies)
Discussion started by: Wpgn
2 Replies

8. Shell Programming and Scripting

Grep a particular string from column eliminating characters at the end.

Hi, So basically I have this file containing query output in seperated columns. In particular column I have the below strings: news news-prio I am trying to grep the string news without listing news-prio aswell. I tried grep "$MSG_TYPE" , grep -w "$MSG_TYPE" , grep... (4 Replies)
Discussion started by: nms
4 Replies
Info::Layer3::Cisco(3pm)				User Contributed Perl Documentation				  Info::Layer3::Cisco(3pm)

NAME
SNMP::Info::Layer3::Cisco - SNMP Interface to L3 and L2+L3 IOS Cisco Device that are not covered in other classes. AUTHOR
Max Baker SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. my $cisco = new SNMP::Info( AutoSpecify => 1, Debug => 1, # These arguments are passed directly to SNMP::Session DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $cisco->class(); print "SNMP::Info determined this device to fall under subclass : $class "; DESCRIPTION
Subclass for Generic Cisco Routers running IOS Inherited Classes SNMP::Info::CiscoVTP SNMP::Info::CDP SNMP::Info::CiscoStats SNMP::Info::CiscoImage SNMP::Info::CiscoRTT SNMP::Info::CiscoQOS SNMP::Info::CiscoConfig SNMP::Info::Power SNMP::Info::Layer3 Required MIBs CISCO-EIGRP-MIB Inherited Classes' MIBs See "Required MIBs" in SNMP::Info::CiscoVTP for its own MIB requirements. See "Required MIBs" in SNMP::Info::CDP for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoStats for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoImage for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoRTT for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoQOS for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoConfig for its own MIB requirements. See "Required MIBs" in SNMP::Info::CiscoPower for its own MIB requirements. See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements. GLOBALS
These are methods that return scalar value from SNMP $cisco->vendor() Returns 'cisco' $cisco->eigrp_id() ("cEigrpAsRouterId") Global Methods imported from SNMP::Info::CiscoVTP See documentation in "GLOBALS" in SNMP::Info::CiscoVTP for details. Globals imported from SNMP::Info::CDP See documentation in "GLOBALS" in SNMP::Info::CDP for details. Globals imported from SNMP::Info::CiscoStats See documentation in "GLOBALS" in SNMP::Info::CiscoStats for details. Globals imported from SNMP::Info::CiscoImage See documentation in "GLOBALS" in SNMP::Info::CiscoImage for details. Globals imported from SNMP::Info::CiscoRTT See documentation in "GLOBALS" in SNMP::Info::CiscoRTT for details. Globals imported from SNMP::Info::CiscoQOS See documentation in "GLOBALS" in SNMP::Info::CiscoQOS for details. Globals imported from SNMP::Info::CiscoConfig See documentation in "GLOBALS" in SNMP::Info::CiscoConfig for details. Globals imported from SNMP::Info::CiscoPower See documentation in "GLOBALS" in SNMP::Info::CiscoPower for details. Globals imported from SNMP::Info::Layer3 See documentation in "GLOBALS" in SNMP::Info::Layer3 for details. TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash. $cisco->eigrp_peers() Returns EIGRP peer IP addresses ("cEigrpPeerAddr") $cisco->i_vlan() Returns a mapping between "ifIndex" and the PVID or default VLAN. Table Methods imported from SNMP::Info::CiscoVTP See documentation in "TABLE METHODS" in SNMP::Info::CiscoVTP for details. Table Methods imported from SNMP::Info::CDP See documentation in "TABLE METHODS" in SNMP::Info::CDP for details. Table Methods imported from SNMP::Info::CiscoStats See documentation in "TABLE METHODS" in SNMP::Info::CiscoStats for details. Table Methods imported from SNMP::Info::CiscoImage See documentation in "TABLE METHODS" in SNMP::Info::CiscoImage for details. Table Methods imported from SNMP::Info::CiscoRTT See documentation in "TABLE METHODS" in SNMP::Info::CiscoRTT for details. Table Methods imported from SNMP::Info::CiscoQOS See documentation in "TABLE METHODS" in SNMP::Info::CiscoQOS for details. Table Methods imported from SNMP::Info::CiscoConfig See documentation in "TABLE METHODS" in SNMP::Info::CiscoConfig for details. Table Methods imported from SNMP::Info::CiscoPower See documentation in "TABLE METHODS" in SNMP::Info::CiscoPower for details. Table Methods imported from SNMP::Info::Layer3 See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details. perl v5.12.4 2011-09-28 Info::Layer3::Cisco(3pm)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy