+ is not part of basic regular expressions. You would have to do something like this:
or this:
The square brackets are not required. You can use [ \t] instead of each single space in the first part of the sed examples, if you want to replace both spaces and tabs.
Last edited by Scrutinizer; 09-23-2010 at 02:15 PM..
These 2 Users Gave Thanks to Scrutinizer For This Post:
I need to use tip from machine A serial port to machine B serial port. Can someone point me to an example of the correct cable to use?
Thanks. (1 Reply)
I am about to do a script that change the COST so i dont need to change each cost.
The output looks like this.
"OL_ID OL_LINK_COST
----------- ------------
51 10
52 10
53 10
54 10
55 ... (3 Replies)
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
Prerequisite:
• S7-2L Server Hardware Console Access
• Solaris 11.3 OS and LDOM Packages (Ex: 3.4)
• Setup IPS Repositories
Solaris 11 comes with Oracle VM server pre-installed if older version is there remove the old and install latest Oracle VM... (1 Reply)
Often it has been said that echo is neither portable nor correct.
Here is an input.txt:
line1
line2
-n
line4
-en
line6
-x
line8
Then the following fails with BSD/Linux/bash:
while IFS= read line
do
echo "$line"
done < input.txt
It is elegantly improved by means of an echo... (2 Replies)
Unix (and Linux) uses a process tree that gives a natural security, by simple inheritance of attributes.
The following ptree script shows it. It runs on all Linux flavors.
Mostly useful for debugging.
#!/bin/sh
# Solaris style ptree
&& exec /usr/bin/ptree "$@"
... (6 Replies)
Discussion started by: MadeInGermany
6 Replies
LEARN ABOUT X11R4
phones
phones(4) File Formats phones(4)NAME
phones - remote host phone number database
SYNOPSIS
/etc/phones
DESCRIPTION
The file /etc/phones contains the system-wide private phone numbers for the tip(1) program. /etc/phones is normally unreadable, and so may
contain privileged information. The format of /etc/phones is a series of lines of the form:
<system-name>[ ]*<phone-number>.
The system name is one of those defined in the remote(4) file and the phone number is constructed from [0123456789-=*%]. The `=' and `*'
characters are indicators to the auto call units to pause and wait for a second dial tone (when going through an exchange). The `=' is
required by the DF02-AC and the `*' is required by the BIZCOMP 1030.
Comment lines are lines containing a `#' sign in the first column of the line.
Only one phone number per line is permitted. However, if more than one line in the file contains the same system name tip(1) will attempt
to dial each one in turn, until it establishes a connection.
FILES
/etc/phones
SEE ALSO tip(1), remote(4)SunOS 5.10 14 Jan 1992 phones(4)