Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RFC1795

    Expanding IP ranges into single IP addresses (AWK or Other method best?)

    @mikrom Thank you so much!! That is exactly what I was after.. tested and working 100% fine [bigsmile] Brilliant solution.. and I love it! :-) [thanks2]
  2. RFC1795

    Expanding IP ranges into single IP addresses (AWK or Other method best?)

    Hi All, Which is the best method for me to handle this? I'm thinking awk might be the way to go perhaps, but not sure where to start even. I have a text file, which contains IP addresses and ranges as per this example: 10.10.115.69 10.10.128.6 - 10.10.128.7 10.10.128.20 10.10.128.28...
  3. RFC1795

    Why does this behave this way?

    Thanks PHV! Quoting catches me out all the time [lol]
  4. RFC1795

    Why does this behave this way?

    Hi All, Probably a simple one, but I'm not understanding why this isn't working the way I expect it to work: AB="level20" echo "filename50.cfg,$AB" | awk -F. '{print $1","$AB}' Output: filename50,filename50.cfg,level20 I'm expecting output to be: filename50,level20 I'm confused... might...
  5. RFC1795

    grep issue in ksh script

    @tmd1332 .. recently one very simple one stumped me wasting hours. Probably not related to your problem, but you never know lol .. jump down to '20 Nov 13 15:47' on this one that tripped me up (once again) http://www.tek-tips.com/viewthread.cfm?qid=1721210
  6. RFC1795

    Simple thing .. just can't get it to work! 'if statement'

    @SamBones yeah, I've used the dos2unix on occasion, but 99% of the time I never need it. This one caught me out once again lol @PHV, man, you're still kicking about! :-) ... Nice one.. I didn't know about that awk search feature, thanks for that. I'll give it a try and probably find it improves...
  7. RFC1795

    Simple thing .. just can't get it to work! 'if statement'

    UPDATE: Thought I best come back and mention that I only found time to work on this one again today. Took me a few minutes to see the problem, only once I vi'd my source data and noticed that at every line with a (fc1) ended with the mangey (ctrl-v M) ^M character. [evil] A quick sed replace on...
  8. RFC1795

    Simple thing .. just can't get it to work! 'if statement'

    Sorry SamBones, but you're quite right in spotting that .. I was typing it out to keep it simple instead of copy and paste the mess I've chucked together [tongue] I'm using bash, got 100's of similar scripts working fine .. just this one has me stumped. I'll get back on the system this weekend...
  9. RFC1795

    Simple thing .. just can't get it to work! 'if statement'

    Oh, I should add, I have tried variations of this too: if [ $BVAR = "fc1" ] if [ "$BVAR" = "fc1" ] if [ $BVAR = fc1 ] All same issue.
  10. RFC1795

    Simple thing .. just can't get it to work! 'if statement'

    Hi All, Wasted enough time on this so hopefully someone can tell where I'm going wrong here. Such a simple problem, but it's doing my head in! I'm catching some data into variable VAR, looking to see if it contains (fc1) .. if so echo string and do something else if matches it. I've tried both...
  11. RFC1795

    SNMP Perl script to view routing table on Cisco

    Thanks bnorton916 The command was printed to the screen, a copy and paste to the command line did nothing, so I expect the ipRouteDest command is not supported by the Cisco device. #/usr/bin/snmpwalk -v 1 -c private=string router1 ipRouteDest # If I run the command without the ipRouteDest I...
  12. RFC1795

    SNMP Perl script to view routing table on Cisco

    ...$rtr ifDescr`; #@iftable=qq{$snmpwalk $rtr ifDescr}; for $ifnum (@iftable) { chomp (($intno, $intname) = split (/ = /, $ifnum)); $intno=~s/.*ifDescr\.//; $intname=~s/"//gi; $int{$intno}=$intname; } @ipRouteDest=`$snmpwalk $rtr ipRouteDest`; @ipRouteDest=`$snmpwalk $rtr...
  13. RFC1795

    Bareword found where operator expected at errors

    Thanks Feherke! Much appreciated .. no more errors. No data either, but that's not a perl issue ;-)
  14. RFC1795

    Bareword found where operator expected at errors

    ...@iftable=\Q$snmpwalk $rtr ifDescr\Q; for $ifnum (@iftable) { chomp (($intno, $intname) = split (/ = /, $ifnum)); $intno=~s/.*ifDescr\.//; $intname=~s/"//gi; $int{$intno}=$intname; } @ipRouteDest=\Q$snmpwalk $rtr ipRouteDest\Q; @ipRouteMask=\Q$snmpwalk $rtr ipRouteMask\Q...
  15. RFC1795

    Understanding IOS Levels & Vulnerabilites

    Hi Does anyone have a good explanation on how the IOS levels, trains work? I'm looking into various IOS levels along with vulnerabilities and sometimes I get confused as to whether or not a level is actually vulnerable. Take this for example. If a device is running "124-6.T7" version of IOS...
  16. RFC1795

    Confuing issue with IF statement ... driving me mad!

    Never mind. Sorted it!! Ran dos2unix against my data file and that sorted everything. That's what happens when you use Windows - pah!
  17. RFC1795

    Confuing issue with IF statement ... driving me mad!

    Hi All I'm stuck on something and not sure what the problem is. This should be basic stuff but I'm not getting it to work. All I want to do is run a small shell script against a file to test if the numbers match up. If they do, print PASS or if not FAIL. The file I want to run against...
  18. RFC1795

    Replace string at end of matching line

    Thanks PHV - works 100% that :-) Thanks all for the help as usual .. one day all these bits and pieces of puzzling bits will fall into place in my head hehe. Cheers... T
  19. RFC1795

    Replace string at end of matching line

    ...some of it exactlly as described it would. The thing is, that whole string is the actual password in its encrypted format: $1$LuDC$b/siw3\*&sw.{]%sdjhakw83q2 Maybe it would be better to work it this way; replace the whole string after the word password as i'm sure it will always be only...
  20. RFC1795

    Replace string at end of matching line

    ...using the above line in another area for another file containing passwords. I applied the following to my test file: sed '/password/s/[0-9 A-Z-]*$/ XXXXXXXXXXXX/' However, the password contains various other characters eg: $1$LuDC$b/siw3\*&sw.{]%sdjhakw83q2 Is this also something...

Part and Inventory Search

Back
Top