Search Results

Search: Posts Made By: domi55
6,429
Posted By domi55
Great! Thats what I need! I do now use the...
Great! Thats what I need!
I do now use the following:

awk '$2 ~ /192.168.0.(1|2|3)$/'
6,429
Posted By domi55
Unfortunately its egrep this time. ;) #...
Unfortunately its egrep this time. ;)

# egrep -w '192.168.0.(1|2)' arp.txt
egrep: illegal option -- w
usage: egrep [ -bchilnsv ] [ -e exp ] [ -f file ] [ strings ] [ file ] ...
6,429
Posted By domi55
egrep '192.168.0.(1 |2 )' arp.txt This does...
egrep '192.168.0.(1 |2 )' arp.txt

This does work here. But is this really a good solution?
6,429
Posted By domi55
Not really ;) I'm interested in the MAC...
Not really ;)

I'm interested in the MAC Address.

File arp.txt:
e1000g0 192.168.0.1 255.255.255.255 o 00:00:00:00:00:01
e1000g0 192.168.0.11 255.255.255.255 o ...
6,429
Posted By domi55
My words ;) But I have an other question: ...
My words ;)

But I have an other question:

How can I grep/egrep for exactly two (192.168.1 AND 192.168.2 for example) hosts?

arp -a | egrep '192.168.0.(1|2)'

This egrep delivers four hosts.
6,429
Posted By domi55
Thanks. Exactly what I need. Sorry for my...
Thanks. Exactly what I need.
Sorry for my stupid question ;)
6,429
Posted By domi55
grep/egrep end of pattern
Hi

I use arp to get the mac-addresses of my hosts.


# arp -a | grep 192.168.0.
e1000g0 192.168.0.1 255.255.255.255 o 00:00:00:00:00:01
e1000g0 192.168.0.11 ...
33,292
Posted By domi55
OMG. Thanks so much guys. But unfortunately...
OMG. Thanks so much guys.

But unfortunately I prefere awk ;)

@ jim mcnamara:

How can I just print out four (4) characters.
33,292
Posted By domi55
sed - print only matching regex
Hi folks,

Lets say I have the following text file:


name, lastname, 1234, name.lastname@test.com
name1, lastname1, name2.lastname2@test.com, 2345
name, 3456, lastname,...
1,640
Posted By domi55
thanks so much devtakh! This is exactly what...
thanks so much devtakh!

This is exactly what i need. One last thing:

Do you know why there is some space in front of the first string?

more file.out | sed...
1,640
Posted By domi55
wow that was quick and works for me! thanks...
wow that was quick and works for me! thanks devtakh.

But what happens if the content of <tr>...</tr> will change a little bit?

Is it not possible to search on given expressions and just print...
1,640
Posted By domi55
sed/awk print out
guys...

i'm currently trying to parse some html code:

<tr class="first" name="bc_10934363" class=""><td class="col1"><div class="ctitle">Some text</div><div class="crec"...
13,823
Posted By domi55
Alright I fixed my issue ;) expect "*~#*" ...
Alright I fixed my issue ;)

expect "*~#*"
send -- "/bin/more -p /tmp/file\r"
expect "*~#*"
send "exit\r"
expect eof
exit 0
13,823
Posted By domi55
Expect Script - No End
Hi folks,

Im new on expect. I'd like to develop an expcet script which copies a file to a host trough scp and after that the script makes an ssh to the specified host and executes the file.
...
10,595
Posted By domi55
Yes! That is now exactly what I need! Thany you...
Yes! That is now exactly what I need! Thany you so much!

Script:
/usr/xpg4/bin/awk 'match($0, "T[0-9]{4}"){out1=substr($0,RSTART,RLENGTH);if(substr($0,RSTART+RLENGTH,3) ==" A1"){out2="A1"};{print...
Forum: Solaris 01-02-2009
108,165
Posted By domi55
Well... Thats wrong! -bash-3.00# uname -a ...
Well... Thats wrong!

-bash-3.00# uname -a
SunOS biatch 5.10 Generic_137137-09 sun4v sparc SUNW,SPARC-Enterprise-T5120
-bash-3.00# more /etc/release
Solaris 10 10/08...
10,595
Posted By domi55
Arthur, Probably I have to clarify my...
Arthur,

Probably I have to clarify my problem.

Files to parse:

File 1:

First Name: Test
Last Name: Test2
Number: asd asdsf 234T1234 ...dasda
Number 2: asd asdsf 234 T1234 ...dasda...
10,595
Posted By domi55
Do I have to open a new Thread for this awk...
Do I have to open a new Thread for this awk question?
10,595
Posted By domi55
Chris, Thanks for your help. I decided to do...
Chris,

Thanks for your help. I decided to do it this way:

nawk '{s=match($0, "T[0-9][0-9][0-9][0-9]");if(s){print substr($0,RSTART,RLENGTH)}}'Here comes the next Problem:

At the moment I've...
10,595
Posted By domi55
Chris, On Linux (Debian) it does work! ...
Chris,

On Linux (Debian) it does work!

tester:~# more file
First Name: Test
Last Name: Test2
Number: asd asdsf 234T1234 ...dasda
Number 2: asd asdsf 234 T1234 ...dasda
tester:~# sed -n...
10,595
Posted By domi55
Hmm... [user@host] / # more file First...
Hmm...

[user@host] /
# more file
First Name: Test
Last Name: Test2
Number: asd asdsf 234 T1234 ...dasda
Number 2: asd asdsf 234 T1234 ...dasda
[user@host] /
# sed -n...
10,595
Posted By domi55
Thank you guys. @pludi Your script does...
Thank you guys.

@pludi

Your script does not work:


[user@host] ~
# more file
iFirst Name: Test
Last Name: Test2
Number: T1234
Number2: T1234
[user@host] ~
# awk...
10,595
Posted By domi55
printf / regex
Morning folks,

I need help with the following issue:

Let's say we I have the following output:

First Name: Test
Last Name: Test2
Number: T1234
Number2: T1234


Needed Output:
...
Showing results 1 to 23 of 23

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