Search Results

Search: Posts Made By: dis0wned
1,397
Posted By dis0wned
Sorry been away for a week. Ok, heres what Im...
Sorry been away for a week. Ok, heres what Im doing:

There are several command outputs from routers and switches that have different information that is useful when looking to redesign. These are...
1,817
Posted By dis0wned
And that fixed it. Thanks for your help!! ...
And that fixed it. Thanks for your help!!

------ Post updated at 06:28 PM ------

Cool, thanks for the tip.
1,817
Posted By dis0wned
That worked, I had to add > $tempdir/file3 && rm...
That worked, I had to add > $tempdir/file3 && rm $tempdir/file1.$$ $tempdir/file1 to the end of the command. One issue it created and Im not sure which part of the command is doing this but it is...
1,817
Posted By dis0wned
Im sorry, I manually scrubbed the data and didnt...
Im sorry, I manually scrubbed the data and didnt realize I didnt include the matching fields, if you look at the output the field 2 is the same as input file1. The matches start at Gi5/1

------...
1,817
Posted By dis0wned
awk Matching Columns - Am I missing something?
I am using awk to match columns and output based on those matches. For some reason it is not printing matching columns, am I missing something?

Operating system - windows with cygwin.

Command...
1,397
Posted By dis0wned
But it all sounds so good in my head when I am...
But it all sounds so good in my head when I am typing it out! lol

I am truly sorry.

I am getting information from a cisco switch or router and the format of the output is different depending...
2,630
Posted By dis0wned
For in loop - two input variables
When I create a newfile, I am using the filename as a variable to create the new filename. When I ouput it, the filename contains the file extension in the middle of the file
example:...
1,397
Posted By dis0wned
I apologize, when I added the code I kept it to a...
I apologize, when I added the code I kept it to a minimum in an effort to keep it clearer.


awk '/-- show cdp neighbors detail --/,/- show diagnostic result module all detail --/'...
1,397
Posted By dis0wned
Sorry - Windows os running cygwin Sample...
Sorry - Windows os running cygwin

Sample input:
Device ID: ciscoblah
,
IP address: 1.1.1.1
,
Platform: C5548P, Capabilities: Switch IGMP CVTA phone port
,
Interface:...
1,397
Posted By dis0wned
Add NA When String is not found
I am searching for these patterns in my file between commas, when I dont find a pattern match I would Like to add NA.

awk '/Device ID:/ || /address:/ || /Interface:/ || /VLAN:/ || /Platform:/ ||...
2,997
Posted By dis0wned
Nope, didnt do it. ------ Post updated at...
Nope, didnt do it.

------ Post updated at 01:52 PM ------

MadeInGermany, I used your approach and it works. Thanks for giving me the direction.

Below is the code that I used to complete it:...
2,997
Posted By dis0wned
Delete multiple occurrences of the same pattern on a line but the first
The lines that I am trying to format look like

Device ID: j01-01, IP address: 10.10.10.36, IP address: 10.10.10.35, IP address: 10.10.102.201, Platform: 8040, Capabilities:...
5,945
Posted By dis0wned
Thanks, With every day that I spend a little time...
Thanks, With every day that I spend a little time on this script I am slowly getting better!!
5,945
Posted By dis0wned
That did it, I must not be searching the right...
That did it, I must not be searching the right question. What would I search to find this?
5,945
Posted By dis0wned
Print commas between awk output
When I output fields 1 2 4 5 & 6, I would like to have a comma between them but I am beating my head against the wall to get it to work. Any help is appreciated

sed...
3,274
Posted By dis0wned
Its a shell script. More or less I am...
Its a shell script.

More or less I am trying to create a list of files from a specific directory (I will already be in that directory),

I will then
"cat FILE1 > file1"
then
"cat FILE2 >...
3,274
Posted By dis0wned
Shell Scripting - Select multiple files from numbered list
I am trying to have the user select two files from a numbered list which will eventually be turned into a variable then combined. This is probably something simple and stupid that I am doing.
...
2,250
Posted By dis0wned
Perfect, thank you for explaining!! Can you...
Perfect, thank you for explaining!! Can you explain the parts of the command? I want to understand the structure, Ive been struggling with the awk command structure
2,250
Posted By dis0wned
RudiC, sorry. The other post was all over the...
RudiC, sorry. The other post was all over the board and I had a chance to look at this again this morning. I though it was just cleaner to start over. I apologize, and thanks again for your help
...
2,250
Posted By dis0wned
Matching two fields in two csv files, create new file and append match
I am trying to parse two csv files and make a match in one column then print the entire file to a new file and append an additional column that gives description from the match to the new file. If a...
3,338
Posted By dis0wned
FILE1 ...
FILE1

Hostname,Port,Name,Status,Vlan,Duplex,Speed,Type
shintstat,Te1/1 , Trunk- , connected , trunk , full , 10G , 10GBase-CU 3M,
shintstat,Te1/2 , Trunk , connected ...
3,338
Posted By dis0wned
Please see below: I removed the dos carriage...
Please see below: I removed the dos carriage returns / line feeds and ran the command provided again.


TGY9 ~/testfiles/vlanint
$ tr -d '\015' <file2 >file22

TGY9 ~/testfiles/vlanint
$ awk...
3,338
Posted By dis0wned
I pulled the csv into excel and sanitized it,...
I pulled the csv into excel and sanitized it, Below are snippets of the actual file:



FILE1:
Hostname Port Name Status Vlan Duplex Speed Type
Switch Te1/1 link description " connected ...
3,338
Posted By dis0wned
Update, I have been making a little progress but...
Update, I have been making a little progress but still dont have it. This will print fields when there is a match but it isnt printing fields from file1. It will print all lines, but none of the...
3,338
Posted By dis0wned
Nope. Ultimately I am trying to print file1 to a...
Nope. Ultimately I am trying to print file1 to a new file with an additional column (VLAN Name), and the matching vlans have the name field appended to the end of the row. If a match is not made,...
Showing results 1 to 25 of 28

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