Hello I'm trying to write a shell script which can remove a carriage return and/or line feed from a file, so the resulting file all ends up on one line.
So, I begin with a file like this
text in file!<CR>
line two!<CR>
line three!<CR>
END!<CR>
And I want to end up with a file... (1 Reply)
I am doing some edi where translations had to be run on unix. Generally when I run the translations on windows, the output file has both carriage returns and line feed where as when ran on unix will have only line feed. I need to insert carriage return before the line feed. Is there some tool... (2 Replies)
Hi,
I have a situation where I need to remove the carriage return between the lines.
For.eg.
The input file:
1,ad,"adc
sdfd",edf
2,asd,"def
fde",asd
The output file should be
1,ad,adc sdfd,edf
2,asd,def fde,asd
Thanks
Shash (5 Replies)
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
I keep running into the same problem with the following script. Every time it prints the carrage (line feed) char when I test. I believe that the issue is in the group by but I do not see it. The code is as follows.
SET FEED OFF
SET ECHO OFF
SET HEADING OFF
SET LINESIZE 1000
SET PAGESIZE... (1 Reply)
Hi
I am using sed command to make SCORE=somevalue to SCORE=blank in a file.
Please see the attached lastline.txt file. After executing the below command on the file, it removes the last line.
cat lastline.txt | sed 's/SCORE=.*$/SCORE=/g' > newfile.txt
Why does sed command remove the... (3 Replies)
Hi,
need your help in below,I have 4 types of file need to be processed so that it will replace carriage return in Remarks column with <:::>
Remarks column position may varies in different types of file.
sample file:
col1|col2|col3|col4|col5|col6|col7|Remarks|col9|col10... (8 Replies)
Hi Forum.
I'm running the following awk command to extract the suffix value (pos 38) from the "AM00" record and append to the end of the "AM01" record.
awk 'substr($0,13,4)=="AM00" {SUFFIX = substr($0,38,2)} substr($0,13,4)=="AM01" {$0 = $0 SUFFIX} 1' before.txt > after.txt
Before.txt:... (2 Replies)
Discussion started by: pchang
2 Replies
LEARN ABOUT DEBIAN
xml::feed::entry
XML::Feed::Entry(3pm) User Contributed Perl Documentation XML::Feed::Entry(3pm)NAME
XML::Feed::Entry - Entry/item in a syndication feed
SYNOPSIS
## $feed is an XML::Feed object.
for my $entry ($feed->entries) {
print $entry->title, "
", $entry->summary, "
";
}
DESCRIPTION
XML::Feed::Entry represents an entry/item in an XML::Feed syndication feed.
USAGE
XML::Feed::Entry->new($format)
Creates a new XML::Feed::Entry object in the format $format, which should be either RSS or Atom.
$entry->convert($format)
Converts the XML::Feed::Entry object into the $format format, and returns the new object.
$entry->title([ $title ])
The title of the entry.
$entry->base([ $base ])
The url base of the entry.
$entry->link([ $uri ])
The permalink of the entry, in most cases, except in cases where it points instead to an offsite URI referenced in the entry.
$entry->content([ $content ])
An XML::Feed::Content object representing the full entry body, or as much as is available in the feed.
In RSS feeds, this method will look first for <http://purl.org/rss/1.0/modules/content/#encoded> and <http://www.w3.org/1999/xhtml#body>
elements, then fall back to a <description> element.
$entry->summary([ $summary ])
An XML::Feed::Content object representing a short summary of the entry. Possibly.
Since RSS feeds do not have the idea of a summary separate from the entry body, this may not always be what you want. If the entry contains
both a <description> element and another element typically used for the full content of the entry--either http://www.w3.org/1999/xhtml/body
or <http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as the summary. Otherwise, we assume that there isn't a summary, and
return an XML::Feed::Content object with an empty string in the body.
$entry->category([ $category ])
The category in which the entry was posted.
Returns a list of categories if called in array context or the first category if called in scalar context.
WARNING It's possible this API might change to have an add_category instead.
$entry->tags([ $tag ])
A synonym (alias) for category;
$entry->author([ $author ])
The name or email address of the person who posted the entry.
$entry->id([ $id ])
The unique ID of the entry.
$entry->issued([ $issued ])
A DateTime object representing the date and time at which the entry was posted.
If present, $issued should be a DateTime object.
$entry->modified([ $modified ])
A DateTime object representing the last-modified date of the entry.
If present, $modified should be a DateTime object.
$entry->wrap
Take an entry in its native format and turn it into an XML::Feed::Entry object.
$entry->unwrap
Take an XML::Feed::Entry object and turn it into its native format.
AUTHOR & COPYRIGHT
Please see the XML::Feed manpage for author, copyright, and license information.
perl v5.14.2 2012-03-21 XML::Feed::Entry(3pm)