Search Results

Search: Posts Made By: philipz
5,010
Posted By philipz
Create an array with awk
List,

I want to have an array created of a particular item in the following textfile:

router> show user
Se4/0:29 site1 Sync PPP - Bundle: Di372
Se5/0:29 site2 ...
41,512
Posted By philipz
This worked: awk '{print d, $1}' "d=$(date)"...
This worked:

awk '{print d, $1}' "d=$(date)" test.txt

Not sure why you added the { ... }

Thanks a lot!
41,512
Posted By philipz
awk to print current date?
List,

I want to print the first line of my text file (say "me you"), preceded by the current date/time.

Something like (pseudo code):
awk '{print date,$1}'

I don't have a lot of awk...
10,303
Posted By philipz
Yes; the last entry of the last access-list can...
Yes; the last entry of the last access-list can be followed by any router command...
10,303
Posted By philipz
This works!!!! Thanks everybody, really...
This works!!!! Thanks everybody, really appreciated...

Radoulov, can you please explain a bit what it does? The result is there, but it would be nice to know a bit how it is working as well... :D...
10,303
Posted By philipz
It seems like it doesn't find the pattern... For...
It seems like it doesn't find the pattern... For your reference I pasted the access-list where I do the test on:


[root@bsd01 /home/me]# more qos.htm
ip access-list extended YourAccessList1
...
10,303
Posted By philipz
This doesn't give any result (no error message...
This doesn't give any result (no error message either). I have the feeling we're getting closer anyway...

nawk is on my system as well; no result either. How do I check the version? :eek:
10,303
Posted By philipz
awk '!/deny|remark|permit|MyAccessList/{next} ...
awk '!/deny|remark|permit|MyAccessList/{next}
/MyAccessList/,0' fileThis one gives an error message:
awk: syntax error at source line 1
context is
>>>...
10,303
Posted By philipz
I don't have my BSD machine here to test now, but...
I don't have my BSD machine here to test now, but I don't think it will work.
From what I can read, you check until you find a line that starts with "ip access-list extended", but the end of the...
10,303
Posted By philipz
... ip access-list extended MyAccessList ...
...
ip access-list extended MyAccessList
remark Do not allow Jones subnet to telnet out
deny tcp host 171.69.2.88 any eq telnet
remark Do allow me to telnet out
permit tcp host...
10,303
Posted By philipz
This is what I need (I don't know the amount of...
This is what I need (I don't know the amount of lines in my accesslist), but I also don't know the nale of the next accesslist...
So it should print all lines starting from "ip access-list extended...
10,303
Posted By philipz
Script to parse an access-list
Folks,

I have a textfile with the config of my router. Part of that config looks like this:

router config
...
ip access-list extended MyAccessList
remark this is my security rule
...
Showing results 1 to 12 of 12

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