fwaechter

1

votes
6

answer
10.1k

views

Validate Emails with Bash

I try to validate an email with a shell script. Is there a easy example to validate a mail? Asked google but just found crap and PHP (also crap..). Thanks and regards.
fwaechter
1

votes
1

answer
1.7k

views

GreaseMonkey - JavaScript - Remove some css and js refs suffixes

I have css and js links in head AND body from a website where i want to remove a suffix. The CSS link in the head looks like this: and some JavaScript includings in the body like this: Now i want to remove the '?r=5.6' part from this links (with GreaseMonkey). With the following code i find it and c...
fwaechter
2

votes
1

answer
320

views

Twisted Names - Authoritative Server - More than one zone [closed]

I'll try to create an authoritative server with twisted names. According to the docs i can define a zone file like this: twistd -n dns --pyzone example-domain.com But... how can I specify more than one zone file? twistd -n dns --pyzone example-domain.com example-domain.net or twistd -n dns --pyzone...
fwaechter
2

votes
5

answer
13k

views

Parse a dhcpd.lease File with Bash

I Try to parse my dhcpd.lease File with Basel. A typical entry looks like this: lease 192.168.20.4 { starts 6 2009/06/27 00:40:00; ends 6 2009/06/27 12:40:00; hardware ethernet 00:00:00:00:00:00; uid 00:00:00:00:00:00; client-hostname 'examle-workstation1'; } All information i get is the MAC and wha...
fwaechter
1

votes
3

answer
455

views

Grep with “half”-exact match

I try to use grep to match a case like this: I have a list of hostname and ips in this format: 238-456 192.168.1.1 ak238-456 192.168.1.2 238-456a 192.168.1.3 458-862 192.168.1.4 Now i try to grep '238-456' but of course this returns: 238-456 192.168.1.1 and... ak238-456 192.168.1.2 and... 238-456a 1...
fwaechter
31

votes
3

answer
13.4k

views

How do I pair every two lines of a text file with Bash? [duplicate]

This question already has an answer here: How to merge every two lines into one from the command line? 20 answers With a simple bash script I generate a text file with many lines like this: 192.168.1.1 hostname1 192.168.1.2 hostname2 192.168.1.3 hostname3 Now I want to reformat this file so it look...
fwaechter
4

votes
6

answer
3.9k

views

BASH: Split MAC Address -> 000E0C7F6676 to 00:0E:0C:7F:66:76

Hy, Can someone help me with splitting mac addresses from a log file? :-) This: 000E0C7F6676 should be: 00:0E:0C:7F:66:76 Atm i split this with OpenOffice but with over 200 MAC Address' this is very boring and slow... It would be nice if the solution is in bash. :-) Thanks in advance.
fwaechter