Search Results

Search: Posts Made By: djzah
1,972
Posted By djzah
Thank You RudiC I want to use your code but...
Thank You RudiC

I want to use your code but I'm obviously doing something wrong.

I copied your entire code, placed it in a file called test.awk and changed file to useraudit.txt which contains...
1,972
Posted By djzah
Sorry Rudi... I pasted the content in the first...
Sorry Rudi... I pasted the content in the first post.. i suppose i should of just attached the txt file.

contents of useraudit.txt
auth user SVC_Qualys {
description "SVC_Qualys"
role...
1,972
Posted By djzah
Some reason I am just not getting this to work. ...
Some reason I am just not getting this to work.

The expected results based on the useraudit.txt file is
auth user,description,role
SVC_Qualys,SVC_Qualys,guest
admin,Admin User,admin...
1,972
Posted By djzah
Yea, always three lines I'm a bit puzzled on...
Yea, always three lines

I'm a bit puzzled on awk still but I have a feeling its the best approach.

I am thinking maybe this is a better script but its not working exactly like I was hoping....
1,972
Posted By djzah
Find and Replace Pattern in file
Ok, so how many times have you received this request? I have been looking through the forum for examples and I see the use of tr, awk and sed to perform similar functions but not sure how to use the...
1,141
Posted By djzah
wow, impressive. This gave me a great start...
wow, impressive. This gave me a great start which worked. I made a minor change to only include IP Addresses

sed -n '/net self \/Common\/[0-9]/,/}/p' file
Now it lists everything, how do we do...
1,141
Posted By djzah
Search from 1st match and end 2nd match
I've been looking through the forums for awhile now and looking at the man page for grep and egrep and not seeming to find this scenario so it might not be possible but figured I'd throw it out to...
6,902
Posted By djzah
Is there a possible limitation on lines? Trying...
Is there a possible limitation on lines? Trying on another config and getting blank lines:
,,,,
,,,,
,,,,
,,,,
,,,,
,,,,
,,,,
,,,,

So I did a
$ cat Configs/blahblah.Config | grep...
6,902
Posted By djzah
I'm trying to figure out how you did your magic...
I'm trying to figure out how you did your magic for learning purposes and entering what I believe is happening with comments.

I'm a tad confused on the variable settings after you find the...
6,902
Posted By djzah
Thats incredible. Exactly what I was trying to...
Thats incredible. Exactly what I was trying to do. Your script makes it look so easy. I really appreciate it. Thank You. Now I would like to try and dissect what you are doing so I can learn how...
6,902
Posted By djzah
Parsing cisco cfg to export as csv
I have been looking everywhere for a solution and it seems as though awk may do the trick. I am very much a newbie in the awk scripting world but it seems to appear one of the best text parsing...
2,021
Posted By djzah
Been attempting to figure this out myself (so I...
Been attempting to figure this out myself (so I can learn) but I can not figure out how to alter the script RudiC created to delete instead of print contents to a text file. Everytime I test the...
2,021
Posted By djzah
That code works great RudiC exporting the actual...
That code works great RudiC exporting the actual entire zone into its own text file. (Creating Backups of the domains). I'll admit the code is way advanced. I'm going to try and break down each of...
2,021
Posted By djzah
Thanks, it worked pretty good. It didn't...
Thanks, it worked pretty good.

It didn't remove the last };

Before snapshot
zone "djzah.com" {
type master;
file "trade.dir/db.djzah.com";
};

zone "hosangit.biz" {
...
2,021
Posted By djzah
Yes, that would be part of it as well. A...
Yes, that would be part of it as well. A complete clean up activity of the named.conf of anything that is in the domains.txt input file
2,021
Posted By djzah
Search and Destroy Script Direction Help
Being a beginner in scripting I am not sure the direction to take to accomplish the below task and would love suggestions.

GOAL
input file: domains.list
Read input file, search in named.conf and...
11,661
Posted By djzah
How to grep exact string with quotes and variable?
As the title says I'm running a korn script in attempts to find an exact match in named.conf

finddomain.ksh
#!/bin/ksh
#
echo "********** named.conf ************"
file=/var/named/named.conf...
1,793
Posted By djzah
Understood. I did figure it out. I had to include...
Understood. I did figure it out. I had to include all in the same line. I usually only ask for help when I'm failing with everything I try to figure it out. Awk has been most challenging for me. I...
2,453
Posted By djzah
Just wanted to let you know a suggestion from...
Just wanted to let you know a suggestion from RudiC to add the following to ignore comments at the beginning of the script, fixed my issue.
/^\/\//{next}
Just wanted to share.
1,793
Posted By djzah
Thank You everyone for your posts. RudiC...
Thank You everyone for your posts. RudiC suggestion helped me greatly. Thank You!

I know that will take care of any comments that begin with
\\
Anyway to also add a way to ignore the comments...
1,793
Posted By djzah
[Solved] awk oddity
I have to apologize for my ignorance so this question is probably stupid.

How does awk process a file? Does it read from top of input file to end of file going line by line?

Yoda helped me...
2,453
Posted By djzah
Yep.. tried that and it seemed to fix most of the...
Yep.. tried that and it seemed to fix most of the issues.

Some reason I am getting just the word type or file in the fields instead of the actual setting. I thought it might have spacing versus a...
2,453
Posted By djzah
Worked GREAT! Thank You very much.. that is so...
Worked GREAT! Thank You very much.. that is so awesome

---------- Post updated at 03:27 PM ---------- Previous update was at 02:53 PM ----------

Ran into a weird issue with the script that...
2,453
Posted By djzah
Working much better. Now my error is: ...
Working much better.

Now my error is:
nawk: syntax error at source line 19
context is
n = match ( $0, >>> /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/, <<< I )
nawk: illegal...
2,453
Posted By djzah
Thanks, I see where you are going with the awk...
Thanks, I see where you are going with the awk command. I tried running it but get
awk: syntax error near line 7
awk: illegal statement near line 7
awk: newline in string near line 7
awk: syntax...
Showing results 1 to 25 of 31

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