You are missing a dot at this position:
You want
but you have
There is also a nice POSIX expression for hexadecimal numbers:
Just a side note regarding your topic (no biggie - just to clarify):
This regular expressions are from the grep command, not the bash shell
Hi,
Actually i have written one test.sh (shell program) in bash.
Here i have a variables $a which stored the value package1.
Now I want to write a regular expression inside the if command that "if $a variable contains letter p in the begining of the value package1 then it is coming true.... (5 Replies)
In Perl I can write a condition that evaluates a match expression like this:
if ($foo =~ /^bar/) {
do blah blah blah
}
How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 Replies)
Hi,
I have script which will take a string as input and search in a file.
But when I want to search a pattern which has special characters script is ignoring it.
For example: I want to search a pattern "\.tumblr\.com". shell script is removing \ (backslah) and trying to search... (7 Replies)
Dear all,
I have a specific problem that I don't quite understand how to solve. I have two files, both of the same format:
XXXXXX_FIND1 bla bla bla
bla
bla
bla
bla
bla
bla
bla
bla
bla
========
(return)
XXXXXX_FIND2 bla bla bla
bla
bla
bla (10 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
hi
i am trying to extract some specific data out of a text file using regular expressions with shell script
that is using a multiline grep .. and the tool i am using is pcregrep so that i can get compatibility with perl's regular expressions
for a sample data like this, i am trying to grab... (6 Replies)
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
I do have a shell file where I call many unix commands . I would like to add a regular expression step in that shell file, where a text file, say Test.txt has to be openned and all the :'s should be replaced.
Basically apply the follwoing regular expression:
:%s/://g
to that particular text... (2 Replies)
If i do below command in unix prompt which static values (ie 27..97), it is working fine and gives desired output
>ls -d $WORKDIR/batch/somefilename_{27..97}.* 2>/dev/null
somefilename_27.sometxt
somefilename_28.sometxt
somefilename_29.sometxt
..
somefilename_97.sometxt
But if i want... (2 Replies)
Discussion started by: haiderali
2 Replies
LEARN ABOUT DEBIAN
setether
SETETHER(8) System Manager's Manual SETETHER(8)NAME
setether - Set the ethernet address for use with DECnet
SYNOPSIS
setether <if> [<if>...]|all [options]
DESCRIPTION
Set ethernet MAC address on ethernet adaptors
This script should be run at system startup. It will change the ethernet hardware (MAC) address of any or all ethernet interfaces to match
the DECnet node address. DECnet requires that the MAC address of all ethernet adaptors running the protocol be set approriately. If you do
not run setether then you must change the ethernet address in some other way for DECnet to work.
By default no ethernet interfaces will have their MAC addresses changed by setether, if you specify all then all interfaces name eth* will
be changed, otherwise a list of interface names can be specified. setether will enable (UP) all interfaces it changes the MAC addresses
of.
(2.4 only) The first interface specified on the command-line will also be made the default interface for DECnet operations (ie attempts to
contact nodes not in the neighbour table will be done over this interface).
This script must be run with the interface inactive, it is normally run from /etc/init.d/decnet before TCP/IP starts up.
EXAMPLES
set the MAC address of eth0.
# /sbin/setether eth0
set the MAC address of all ethernet interfaces
# /sbin/setether all
HELPFUL HINTS
If you have multiple ethernet cards on your system and they are connected to the the same network you should specify which one you want to
use for DECnet communication on the setether command line, otherwise they will both be given the same MAC address and this is probably not
what you want.
Running DECnet on multiple ethernet interfaces only works under Linux 2.4. If you are running Linux 2.2 then the interface name on the
setether command line must match the one in /etc/decnet.conf(5).
SEE ALSO decnet.conf(5), dntype(1), dndir(1), dndel(1), dnetd(8), dnping(1)DECnet utilities March 01 2001 SETETHER(8)