Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Copy the content from txt file and create a html file Post 303035233 by DevAakash on Friday 17th of May 2019 01:16:13 AM
Old 05-17-2019
Copy the content from txt file and create a html file

I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the file
Tried the below code
Code:
readsrror=`cat newfile.txt`
 echo "<html>" >>email.html
 echo "<body>" >>email.html
for i in $(echo $readsrror| sed "s/endresult/ /g")
do
    echo "<tr>" >>email.html
    echo "$i" >>email.html# only the tag is getting copied not the entire content.
    echo  "</tr>" >>email.html
done
echo "</body>" >>email.html
 echo "</html>" >>email.html


Last edited by DevAakash; 05-17-2019 at 05:18 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to create file.txt and add current date in file content

Hey guy, how to make bash script to create foo.txt file and add current date into file content and that file always append. example: today the script run and add today date into content foo.txt and tomorrow the script will run and add tomorrow date in content foo.txt without remove today... (3 Replies)
Discussion started by: chenboly
3 Replies

2. Shell Programming and Scripting

Select some lines from a txt file and create a new file with awk

Hi there, I have a text file with several colums separated by "|;#" I need to search the file extracting all columns starting with the value of "1" or "2" saving in a separate file just the first 7 columns of each row maching the criteria, with replacement of the saparators in the nearly created... (4 Replies)
Discussion started by: capnino
4 Replies

3. Shell Programming and Scripting

Format txt file as html table

I have a short time to solve a problem, so I need some help. I've searched the forum, but I couldn't find a solution to my problem. I made a script to filter some text and now I have a new requirement to make it available as html table. Problem is that I more than one files with different set... (2 Replies)
Discussion started by: tetreb
2 Replies

4. UNIX for Dummies Questions & Answers

How to copy entire file content into another file being in last line mode of vi ?

How to copy entire file content into another file being in last line mode of vi ? ---------- Post updated at 10:07 AM ---------- Previous update was at 09:56 AM ---------- Got it : :1,30w file.txt (1 Reply)
Discussion started by: presul
1 Replies

5. UNIX for Dummies Questions & Answers

Help with Aligning the content of a txt file

Hello friends Please help me to display the content of a file in specific aligned manner. for ex. the content of the file may be >$TEST WELCOME HI HELLO UNIX SHELL SCRIPTING >$ I want to display the content like . TEST WELCOME HI HELLO ... (18 Replies)
Discussion started by: rajmohan146
18 Replies

6. Shell Programming and Scripting

create txt file form data file and add some line on it

Hi Guys, I have file A.txt File A Data AK1521 AK2536 AK3164 I want create text file of all data above and write some data on each file. want Output on below folder /home/kka/out AK1521.txt Hi Welocme (3 Replies)
Discussion started by: asavaliya
3 Replies

7. Shell Programming and Scripting

create txt file form data file

File A.txt LL07 LL07_B_1 20 LL85 LL85_A_1 40 LL85 LL85_B_1 40 LL85 LL85_C_1 30 LL37 LL37_A_1 60 LL37 LL37_B_1 20 LL37 LL37_C_1 50 I want cretae diffrent tex file base of above file Should be threee text file LL07.txt LL85.txt LL37.txt Eaach text file have below data... (2 Replies)
Discussion started by: asavaliya
2 Replies

8. Shell Programming and Scripting

Need to convert output.txt into html file

I have output.txt file generated through shell scripts which need convert in tabular format using html can you please help me output.txt Token State Date1 Date2 Description Name 34567 open 27/06/13 28/06/13 ... (5 Replies)
Discussion started by: vijay_rajni
5 Replies

9. Shell Programming and Scripting

Change the file name and copy old file content to new file names.

Hi, I have a files in a directory as below :- ls -1 mqdepth-S1STC02 proc-mq-S1STC01 proc-mq-S1STC02 proc-mq-S1STC03 Whereever i have S1STC i need to copy them into new file with file name S2STC. expected output :- ls -1 mqdepth-S2STC02 proc-mq-S2STC01 proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies

10. UNIX for Dummies Questions & Answers

Convert Txt file to HTML table and email

Hi all I need help converting a text file into a html table in bash and I need to email this table. The text file looks like the below. Two columns with multiple rows. Top row being header. Application Name Application Status Application 1 Open Application 2 ... (2 Replies)
Discussion started by: hitmanjd
2 Replies
VORBISCOMMENT(1)						   Vorbis Tools 						  VORBISCOMMENT(1)

NAME
vorbiscomment - edits Ogg Vorbis comments SYNOPSIS
vorbiscomment [-l] file.ogg vorbiscomment -a [ -t "tag=value" ] in.ogg out.ogg vorbiscomment -w in.ogg out.ogg DESCRIPTION
vorbiscomment reads, modifies, and appends Ogg Vorbis audio file metadata tags. OPTIONS
-a Append comments. -c commentfile Take comments from a file. The file is the same format as is output by the the -l option: one element per line in 'tag=value' for- mat. -h Show command help. -l List the comments in the ogg vorbis file. -q Quiet mode. No messages are displayed. -t 'tag=value' Specify a new tag on the command line. Each tag is given as a single string. The part before the '=' is treated as the tag name and the part after as the value. -w Replace comments with the new set given either on the command line with -t or from a file with -c. EXAMPLES
To just see what comment tags are in a file: vorbiscomment -l file.ogg To edit those comments: vorbiscomment -l file.ogg > file.txt [edit the comments in file.txt to your statisfaction] vorbiscomment -w -c file.txt file.ogg newfile.ogg To simply add a comment: vorbiscomment -a -t 'ARTIST=No One You Know' file.ogg newfile.ogg SEE ALSO
See http://xiph.org/ogg/vorbis/doc/v-comment.html for documentation on the Ogg Vorbis tag format, including a suggested list of canonical tag names. AUTHORS
Program Authors: Michael Smith <msmith@labyrinth.net.au> Ralph Giles <giles@xiph.org> Manpage Author: Christopher L Cheney <ccheney@debian.org> Xiph.org Foundation December 24, 2001 VORBISCOMMENT(1)
All times are GMT -4. The time now is 11:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy