10-14-2008
thank you very much for the quick reply. It works flawlessly
I'd like to know also how to remove the spaces between content and strings inserted if it's possible
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file
looks like this:
aaaa
bbbb
cccc
eeee
and I would like to print or display it like this:
eeee
cccc
bbbb
aaaa
thanks (5 Replies)
Discussion started by: jpprial
5 Replies
2. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
3. Shell Programming and Scripting
I am very new to scripting and I know this request is simple but I am having no luck with it.
I have a file a.dat with the following data in it.
aa
bb
cc
dd
I need to run a script that will take each line of a.dat and put dsjc/ubin/ in front of each record, so the output looks like
... (2 Replies)
Discussion started by: jclanc8
2 Replies
4. Shell Programming and Scripting
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies
5. Shell Programming and Scripting
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
6. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
7. Shell Programming and Scripting
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)
Discussion started by: diesel88
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Need some help with sed.
I have a file that has sections :
e.g.
a=blah
b=blah
d=blah
e=blah
There's many sections in the file. (1 Reply)
Discussion started by: andyatit
1 Replies
9. Shell Programming and Scripting
Hi,
I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|".
I am looking for some command/option to join these two in single command parameter.
... (6 Replies)
Discussion started by: bhupinder08
6 Replies
10. Shell Programming and Scripting
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)
Discussion started by: bob123
5 Replies
LEARN ABOUT DEBIAN
yodlverbinsert
yodlverbinsert(1) Your Own Document Language yodlverbinsert(1)
NAME
yodlverbinsert - Generate verb-sections from parts of a file
SYNOPSIS
yodlverbinsert [OPTIONS] marker file
DESCRIPTION
Verbinsert is a simple C support program that can be used to generate verb()-sections in Yodl files from sections of existing files. The
files from which sections are included are usually C or Cpp source files, accepting either // or /*-style comment. See the EXAMPLES section
for illustrations.
Verbinsert offers the possibility to indent both the initial verb-statement and the inserted file contents. Furthermore, an additional
empty line may be inserted before the first line that is actually inserted.
o marker
The argument marker must start in file's first column en must either start as a standard C or C++ comment: // or /* must be used.
Following that, the remainder of the argument is used as a label, e.g., //label, /*LABEL*/. Except for the first two characters and
their locations no special restrictions are imposed upon the markers. A labeled section ends at the next //= (when the label started
with //) or at the next /**/ (when the label started with /*). Like the markers, the end-markers must also start in the file's first
column.
o file
The argument file must be an existing file.
Verbinsert writes its selected section to its standard output stream.
NOTE: Starting with Yodl version 3.00.0 Yodl's default file inclusion behavior has changed. The current working directory no longer remains
fixed at the directory in which Yodl is called, but is volatile, changing to the directory in which a yodl-file is located. This has the
advantage that Yodl's file inclusion behavior now matches the way C's #include directive operates; it has the disadvantage that it may
break some current documents. Conversion, however is simple but can be avoided altogether if Yodl's -L (--legacy-include) option is used.
OPTIONS
The default values of options are listed with each of the options between square brackets. The defaults were chosen so that yodlverbinsert
performs the behavior of an earlier version of this program, which was not distributed with Yodl.
o -N
Do not write a newline immediately following verb-statement's open-parenthesis. By default it is written, causing an additional line
to be inserted before the first line that's actually inserted from a file.
o -s spaces [0]
start each line that is written into the verb-section with spaces additional blanks.
o -S spaces [8]
prefix the verb of the verb-section by spaces additional blanks.
o -t tabs [0]
start each line that is written into the verb-section with tabs additional tab characters. If both -s and -t are specified, the tabs
are inserted first.
o -T tabs [0]
prefix the verb of the verb-section by tabs additional tab characters. If both -S and -T are specified, the tabs are inserted first.
EXAMPLE
Assume the file demo contains the following text:
preceding text
//one
one 1
//=
/*two*/
two
/**/
trailing text
Then the following commands write the shown output to the program's standard output:
o verbinclude //one demo
verb(
one 1
)
o verbinclude -N //one demo
verb(one 1
)
o verbinclude -s4 '/*two*/' demo
verb(
two
)
SEE ALSO
yodlstriproff(1), yodl(1), yodlbuiltins(7), yodlconverters(1), yodlletter(7), yodlmacros(7), yodlmanpage(7), yodlpost(1), yodlverbin-
sert(1).
BUGS
-
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl),
yodl_3.00.0.tar.gz 1996-2010 yodlverbinsert(1)