Just put a space before the new text and it will be preserved (the bolded, red underscore is where the space would go):
On an unrelated note, if you want to expand the value of a shell variable into the new text, you cannot use single quotes; you must use double quotes instead.
Hi, I am working on transforming html code text into the .vert text format. I want to use linux utility sed. I have this regexp which should do the work: s/ \(?!*>\)/\n/g. I use it like this with sed: echo "you <we try> there" | sed 's/ \(?!*>\)/\n/g' ... The demanded output should be:
you
<we... (5 Replies)
Hi, excuse me for my poor english.
My problem is that:
I have a File
i want to add to each line of that file two strings: one at the beginning of the line, one at the ending.
string1="abcd"
string2="efgh"
i want $string1 content $string2 for each line.
Is that possible? (3 Replies)
please help in making sed singleline command
i need to insert dos new line (CR LF) before
" 34 matching device(s) found on \\cpu1."
" 6 matching device(s) found on \\cpu7."
" 102 matching device(s) found on \\mainserver."
the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Hi !
I'm rather new with sed ... learned a lot already by googling etc ...
The following script should replace all spaces and ends-of-lines with "something (see below).
#!/bin/bash
i=0
while read line
do
fam="H`printf "%06d" $i`"
echo $line | sed -e 's//\t'$fam'\n/g'
i=$(($i+1))... (7 Replies)
Hi
I want to use sed to insert one space after the 10'th character in every line.
The lines are on this format:
2012-01-1012:30:55|7323456|65432
2011-02-0313:11:06|1223|3456
......
......
Does anyone know sed well enough to acomplish this?
If there is any other way around this... (7 Replies)
I am trying to find a line in a file ("Replace_Flag") and replace it with a variable which hold a multi lined file.
myVar=`cat myfile`
sed -e 's/Replace_Flag/'$myVar'/' /pathto/test.file
myfile:
cat
dog
boy
girl
mouse
house
test.file:
football
hockey
Replace_Flag
baseball
... (4 Replies)
Hi
I've been trying to search but couldn't quite get the answer I was looking for.
I have a a file that's like this
Time, 9/1/12
0:00, 1033
0:10, 1044
...
23:50, 1050
How do I make it so the file will be like this?
9/1/12, 0:00, 1033
9/1/12, 0:10, 1044
...
9/1/12, 23:50, 1050
I... (4 Replies)
i am trying to
insert text at the beginning of every even number line
with awk
i can do it with odd number lines
with this command
awk 'NR%2{$0="some text "$0}1' filehow can i edit this command
thanks (5 Replies)
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)
Discussion started by: duke0001
6 Replies
LEARN ABOUT X11R4
cmap
CMAP(5) File Formats Manual CMAP(5)NAME
cmap - format of .cmap files (color maps)
DESCRIPTION
Color-map files define the mapping between eight-bit color numbers and red, green and blue intensities used for those numbers. They are
read by Magic as part of system startup, and also by the :load and :save commands in color-map windows. Color-map file names usually have
the form x.y.z.cmapn, where x is a class of technology files, y is a class of displays, z is a class of monitors, and n is a version number
(currently 1). The version number will change in the future if the formap of color-map files ever changes. Normally, x and y correspond to
the corresponding parts of a display styles file. For example, the color map file mos.7bit.std.cmap1 is used today for most nMOS and CMOS
technology files using displays that support at least seven bits of color per pixel and standard-phosphor monitors. It corresponds to the
display styles file mos.7bit.dstyle5.
Color-map files are stored in ASCII form, with each line containing four decimal integers separated by white space. The first three inte-
gers are red, green, and blue intensities, and the fourth field is a color number. For current displays the intensities must be integers
between 0 and 255. The color numbers must increase from line to line, and the last line must have a color number of 255. The red, green,
and blue intensities on the first line are used for all colors from 0 up to and including the color number on that line. For other lines,
the intensities on that line are used for all colors starting one color above the color number on the previous line and continuing up and
through the color number on the current line. For example, consider the color map below:
255 0 0 2
0 0 255 3
255 255 255 256
This color map indicates that colors 0, 1, and 2 are to be red, color 3 is to be blue, and all other colors are to be white.
SEE ALSO magic(1), dstyle(5)4th Berkeley DistributionCMAP(5)