08-29-2002
Quote:
Originally posted by gsjf
dude, that failed to aid me in my answer. c'mon it's one line, someone must know.
Why do people find the need to do NO reading these days? I mean comeon is this what todays youth brings? a bunch of ppl who think they can just ask for an answer and they shall recieve?
Peters 1st reply to your post refering you to something that was ALREADY asked was dead on. if you bothered to read it you would see it.
you asked a question we provided you w/ an answer. You must translate it to how you want to use it. This is called learning.
and why would you use sed to add a blank line at the end of a file? just echo a blank line at the end. its much easier.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Discussion started by: web_developer
4 Replies
2. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
3. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
4. Solaris
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies
5. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
6. Shell Programming and Scripting
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)
Discussion started by: vivek d r
3 Replies
7. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
8. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
9. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
answer(1) General Commands Manual answer(1)
NAME
answer - phone message transcription system
SYNOPSIS
DESCRIPTION
The interactive program helps you to transcribe telephone (and other) messages into electronic mail.
The program uses your personal alias database and the system alias database, allowing you to use aliases to address the messages.
Options
supports the following options:
Prompt for phone-slip-type message fields.
Allow addresses that are not aliases.
Operation
begins with the prompt. Enter a one-word alias or a two-word user name ("Words" are separated by spaces.) The user name is converted to
an alias in the form where f is the first character of the first word, lastword is the second word, and all letters are shifted to lower-
case. For example, is converted to the alias
Without the option, the specified or converted alias must exist in the alias databases. With the option, if the processed "alias" is not
in the alias databases, it is used for the address as is.
The fully expanded address is displayed.
With the option, you are asked for typical message slip data:
Enter the appropriate data. You can put just an or nothing after the pertinent dash prompts, or you can type longer comments. Whatever
you enter becomes part of the message. Lines with no added text are omitted from the message.
Finally, you are prompted for a message. Enter a message, if any, ending with a blank line. The message is sent and the prompt is
repeated.
To end the program, enter any one of or at the prompt.
EXAMPLES
User input is in normal type.
With No Options
This example shows a valid alias, an invalid user name, and a valid user name. In the invalid case, the converted alias is displayed in
square brackets.
With the -u Option
If you enter the previous error is treated differently.
With the -p Option
If you enter the phone-slip prompts are added. The three lines with no added text are deleted from the message.
FILES
User alias database data table
User alias database directory table
User alias database hash table
User alias source text
System alias database data table
System alias database directory table
System alias database hash table
System alias source text
Outbound mail message edit buffer
AUTHOR
was developed by HP.
SEE ALSO
elm(1), newalias(1).
answer(1)