Literally cannot get this one, guys. Single line replacement is simple, but I am not understanding the correct syntax for including a new line feed into the substitution part.
Here's what I got. (Cannot use perl)
It renders a terminating error. I'm looking for the correct syntax to basically prepend the chmod part before the search pattern, but just by replacing it, as I've tried a few different ways to try to prepend it, but it didn't work.
I want to use sed to check if a short line is contained in the line after it, and if it is, to delete the short one. In other words, the input is...
This is a
This is a line
... and I want it to give me...
This is a line
Here's what I've tried so far: s/\(^.*\)\n\(\1.*$\)/\2/
Also,... (7 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
i have few lines in a file... i am reading them in a while loop so a particular line is held is $line1.. consider a modified line is held in $line2.... i want to replace $line1 with $line2 in the same file... how to do it..?
i have come up till the below code
sed "s/$line1/$line2/g" tmpfile.sql... (5 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 How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Hi all,
Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE.
for pa in PA_VALUE
blah blah
do
for pb in PB_VALUE
blah blah
do
I have a text file with two columns of values for PA and PB.
14.5 16.7
7.8 9.5
5.6 3.6
etc etc
I would like to read this... (7 Replies)
Discussion started by: crimsonengineer
7 Replies
LEARN ABOUT DEBIAN
efingerd
EFINGERD(8) System Manager's Manual EFINGERD(8)NAME
efingerd - another finger daemon for linux
SYNOPSIS
efingerd [-t X] [-f] [-n] [-u] [--help] [--version]
efingerd should be run from inetd.
DESCRIPTION
efingerd is another finger daemon, giving you complete control over what are you going to display about your computer.
OPTIONS --help Show summary of options and exit.
--version
Show version and exit.
-t X Lifetime for spawned services (in seconds) ex: -t 25 maintain connections for up to 25 seconds (default: -t 60)
-n Do not lookup addresses, use IP numbers instead
-f Do not display users' full names.
-u Ignore user-specific .efingerd file
USAGE
If you are just an ordinary user and efingerd is already installed by your friendly administrator, you can take the advantage of it by mak-
ing executable .efingerd in your home directory (it can be anything - from single shell script to a program in super-hyper-extra-object
oriented language - only speed makes a difference). This program takes two arguments, the first is the name of remote user fingering you
(or (null) if his/her/its system does not run ident), the second one is address of his computer (or ip number, if efingerd is installed
with option -n). Standard output of this program is then displayed to the person fingering you. Look at examples/.efingerd for a nice
example.
Following executables are providing information about your machine to the fingerer:
/etc/efingerd/list
what to display when somebody does finger @your.machine
/etc/efingerd/luser
what to display when somebody fingers user on your machine, and the fingered user does not have ~/.efingerd file
/etc/efingerd/nouser
what to display when somebody fingers non-existent user on your machine
If the local user has file .efingerd in his/her/its home directory, and it is readable by the daemon, it will be executed and it's output
will be served to the fingerer.
These are normal programs, displaying on standard output desired information. These programs are called with following parameters:
$1 - identity of remote user, (null) if his/her/its system is not running ident
$2 - address of remote machine (IP number if it has not reverse DNS entry or you specified -n)
$3 - name of local user being fingered
Look at examples/ for examples. Don't forget that these programs must be executable by efingerd daemon.
SEE ALSO finger(1), fingerd(8)AUTHOR
Radovan Garabik (garabik@fmph.uniba.sk)
BUGS
file .efingerd in user's home directory must be executable and readable by UID efingerd runs under to work.
EFINGERD(8)