if need to input a word or anything at the beginning of every file in a directory. how do i accomplish this?
say the file is named hyperten. how do i make hyperten the first line of every file in a given directory?
thanks (6 Replies)
Hi
I need to add text to the beginning of a file in the same way that cat will put file contents at the end of a file. I want to do this with many files eg
cat newtext >> /usr/home/*/*.bat
Any ideas? (2 Replies)
Hi,
I have file a.txt as below. I want to add one string root beginning of each line.
Sample file a.txt
aaa
bbb
ccc
Sample output
Root aaa
Root bbb
Root ccc
Can any one help me on this? (6 Replies)
I want to append file names at the beginning of a line for each row
file content
abc.txt.gz 123|654|987
bcd.txt.gz 876|trf|kjh
I want a single output file with below format
abc.txt.gz|123|654|987
bcd.txt.gz|876|trf|kjh
This one is working but only with unzip files,need to have... (3 Replies)
how to add value/word at the beginning of each line in a file ?
i have file number.txt and the output is below
1000
1001
1002
1003
1004
i want to add 000 at the beginning of each line, desire output is below
0001000
0001001
0001002
0001003
0001004
and so on
please advise how... (5 Replies)
Hi,
I have multiple files having many lines like as bvelow:
file Name a.txt
abc def
def xyz
123 5678
file Name b.txt
abc def
def xyz
123 5678
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
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)
Hi gurus,
I need add one new line in the begining of current file.
current file
abc
cde
add
xyz
output file
newline
abc
cde
add
xyz (6 Replies)
Discussion started by: ken6503
6 Replies
LEARN ABOUT HPUX
cfingerd.text
CFINGERD.TEXT(5) Configurable Finger Daemon CFINGERD.TEXT(5)NAME
cfingerd.text - cfingerd text rules
EXPLANATION
cfingerd offers different commands that can be placed in text files to display corresponding information. Each command used with cfingerd
in text files begins with a dollar-sign (or a "$"). This usually indicates to cfingerd that when it's displaying a file, it issues the
command given directly after that character and inserts its output.
If you want to display a raw "$" sign, simply put two "$" signs together, or "$$".
Text commands are only parsed if ALLOW_LINE_PARSING is enabled in /etc/cfingerd/cfingerd.conf(5). If it is disabled the text files will be
sent as is, complete with any single or double dollar signs they may contain.
TEXT COMMANDS
The following is a list of text commands and what they do. They are checked case insensitively.
$CENTER will display the entire contents of the line. This command must start at the beginning of the line. This is a very common com-
mand.
$DATE displays the current system date in the format of MM/DD/YY.
$TIME displays the current system time in the format HH:MM A/PM (timezone).
$IDENT displays the identity of the current person fingering your system.
$COMPILE_DATETIME displays the date and time of which the current issue of cfingerd was compiled on your system.
$VERSION displays the current version of cfingerd.
$EXEC executes the rest of the line as a system command and send the output to the fingering user. Pipes, parameters etc. are available.
The $EXEC command must be on a line by itself in order to function properly. The command is executed as nobody.nogroup if used in a system
file. If used in a user file (e.g. .plan) the command is executed as that particular user. cfingerd will fork() before executing the new
command and will drop all priviledges so this is safe.
This feature is only available if ALLOW_EXECUTION is enabled in cfingerd.conf. The program may prodeuce a maximum of 10MB of output.
CONTACTING
If you like the software, and you want to learn more about the software, or want to see a feature added to it that isn't already here, then
please write to cfingerd@infodrom.north.de. The project's webpage is at http://www.infodrom.north.de/cfingerd/ .
SEE ALSO cfingerd(8), cfingerd.conf(5), finger(1), userlist(1), any of the included docs with the standard cfingerd distribution.
1.4.2 7 Aug 1999 CFINGERD.TEXT(5)