Search Results

Search: Posts Made By: svermill
1,402
Posted By svermill
Well, this certainly has promise. My out file...
Well, this certainly has promise. My out file looks pretty good:



100 ^M
90 ...
1,402
Posted By svermill
Not familiar with ex but here's what I saw on my...
Not familiar with ex but here's what I saw on my Mac:

$ ex -s +'/^100/,/^Building/-3 p | q!' Switch1.txt

^Z
[2]+ Stopped ex -s +'/^100/,/^Building/-3 p | q!' Switch1.txt

...
1,402
Posted By svermill
Print Range Only Once Per File
Scenario:

Each of several .txt files contain the following (but perhaps with some minor variations due to code version running on the devices from which the text was extracted):

<output...
7,015
Posted By svermill
I would deny you no request at this moment in...
I would deny you no request at this moment in time! Of course there is no "router1" or "router2" or any of that - everything has been sanitized along the way. In keeping with that spirit, here is a...
7,015
Posted By svermill
Ah, one mystery solved and a new one introduced! ...
Ah, one mystery solved and a new one introduced!

Your above abbreviated code led me to a discovery. It printed the very first hostname and then threw me an error on the very next file, which is...
7,015
Posted By svermill
Yes, that works like a champ. This too completes...
Yes, that works like a champ. This too completes in one second or less, so my lack of xargs isn't hurting me too much. But I will look into it and see if it's something I can get implemented on my...
7,015
Posted By svermill
Yes, the above does work quite nicely! It gives...
Yes, the above does work quite nicely! It gives me an output file in about one second, which isn't bad considering I have roughly 200 .txt files (some of which are quite large) in the directory.
...
7,015
Posted By svermill
No, but what do you think about the final two...
No, but what do you think about the final two posts in this thread:

Convert end-of-line characters (revisited) - Mac OS X Hints (http://hints.macworld.com/article.php?story=20031018164326986)
...
7,015
Posted By svermill
It never takes long before there's something I...
It never takes long before there's something I can't do on OS X that could normally be done on a true *nix box. I couldn't do the -T switch but I could do a lower-case -t switch. For whatever it's...
7,015
Posted By svermill
Yeah, I definitely needed a good night's sleep. ...
Yeah, I definitely needed a good night's sleep. So I stayed up and smoked a cigar instead! :D

Anyway, with xargs using both bash and ksh, I was only getting the hostname of the very first device...
7,015
Posted By svermill
Understood. I have spent countless hundreds...
Understood. I have spent countless hundreds (likely thousands) of hours over the years doing likewise for others on the network engineering side (I'm a CCIE if that means anything to you), and I've...
7,015
Posted By svermill
Me neither! :D (as if!) Then it's...
Me neither! :D (as if!)



Then it's obviously some important detail that I'm failing to share with you.



You assume correctly!



Glad to hear it!

And I just learned something new...
7,015
Posted By svermill
Well I'm feeling very sheepish now because I...
Well I'm feeling very sheepish now because I thought to - and then failed to - mention that this is Mac OS X BSD. I know that sometimes things aren't fully supported in this case, and in retrospect...
7,015
Posted By svermill
Thanks also be to agama! I must say that some of...
Thanks also be to agama! I must say that some of your code is a tad over my head (I will take the time to understand it, though!), so I'm unable to properly break it down in my own mind. All that I...
7,015
Posted By svermill
Thanks bartus11! I think you've gotten me to...
Thanks bartus11! I think you've gotten me to within a character or two of the solution. Here's what I'm seeing:


router1.txt,ntp server 10.40.40.1 prefer
,ntp server 10.40.40.2
,


Your...
7,015
Posted By svermill
Two Input Lines Into Single Output Line (CSV)
Hi all,

My search karate must be weak because I'm about certain something very like this has been asked and answered here many times. I'll give you the exact scenario I've wasted a few hours of...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy