Hello. Trying to insert text at line 1 and after last line of file. I have searched posts but nothing seems to work. I keep getting extra characters error or nothing gets inserted into the file.
#!/bin/sh
touch textfile.txt
sed 'i\
Add this line before every line with WORD' textfile.txt
... (5 Replies)
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
I need help on how I can accomplish my task. I hope someone can help me since I've researching and trying to accomplish this for hours now. Basically, I need to comment-out (or insert a # sign in the beginning of the line) a line when the line has the specific word I am searching. Example I have... (3 Replies)
I have done this sed command to insert one line after a specific string is found:
sed '/patternstring/ a\
new line string' file1
But how do I insert two lines? This is not possible:
sed '/patternstring/ a\
new line string \a
new line string 2' file1 (2 Replies)
Hi
I am trying to insert a block of text 2 lines above a pattern match using sed
eg
#Start of file entry
{
}
#End of file entry
new bit of text has to be put in just above the } eg
#Start of file entry
{
New bit of text
}
#End of file entry (7 Replies)
Hi I was wondering if anyone new of a solution to this problem? I need to copy a time stamp that is on a line of .text in a text file into multiple positions on the same line.
I need to insert the time stamp on the same line between every occurance of the text ".pdf_.html" right after the... (9 Replies)
Hi!
Considering below text, how would I use sed to insert text right below the v0005-line, using the SEPARATOR-line as a pattern to search for, so two lines above the separator? I can do it right above the separator, but not 2 lines...
# v0004 - Some text
# v0005 - More text
#... (5 Replies)
I want to insert "Text" in each file as a place where I mentioned below "Insert Text Here". These files are something like news of newspaper. Generally, newspaper headlines contain one or two lines.
I don't know how it can be identified whether Text is inserted after first line or second line.
... (10 Replies)
Discussion started by: imranrasheedamu
10 Replies
LEARN ABOUT DEBIAN
xrootconsole
XROOTCONSOLE(1) BSD General Commands Manual XROOTCONSOLE(1)NAME
xrootconsole -- display a file (or stdin) to a transparent window
SYNOPSIS
xrootconsole [options] [file]
DESCRIPTION
xrootconsole is a small utility which displays its input in a transparent text box on X's root window. It will read from any file listed on
the command line or, by default, from stdin. It is most useful when it reads from a FIFO; this allows you to redirect multiple commands to
the FIFO and monitor their output.
The options are as follows:
-fg color This option specifies the color to use for displaying text. The default is ``black.''
-bg color This option specifies the color to AND with the root window, for shaded transparency. The default is ``clear.''
-bw number This option specifies the width of the border around xrootconsole in pixels. The default is 0.
-bd color This option specifies the color to use for the border of the window. The default is ``black.''
-fn font This option specifies the font to use for displaying text. The default is ``fixed.''
-c number This option produces output that is number columns wide. Text is written vertically down each column in the order in which text
is received from the input file. The default is 1.
--topdown Forces xrootconsole to display new lines from its input at the top of the screen, scrolling previous lines down. Default behav-
ior is to insert new lines at the bottom and scroll the previous lines up.
--wrap Rather than truncating long lines, this option specifies that xrootconsole should wrap excess text to the following line or
lines, as necessary.
--ansi-color
Enable color support by parsing ANSI escape sequences.
-geometry geometry
This option specifies the preferred size and position of the window; see X(1). The default is ``80x10+0+0.''
-h, --help Displays a detailed usage message and exits.
-v, --version
Displays the program version and exits.
file Optionally specifies a file from which to read input; by default, xrootconsole reads from the standard input.
DIAGNOSTICS
Exit status is 0 on success, and 1 if the command fails for any reason.
AUTHORS
Eric Youngblut is the original author of xrootconsole. Bob Galloway <bob@de-fac.to> is the current maintainer. Alexandre Duret-Lutz elimi-
nated flicker by storing the background pixmap and drawing off-screen. This manual page was written by Zak Johnson <zakj@i.am>.
BSD May 19, 2000 BSD