+ 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)