Sponsored Content
Top Forums Shell Programming and Scripting Add a new field at the end of each line Post 302879406 by saeed.soltani on Thursday 12th of December 2013 10:02:46 AM
Old 12-12-2013
Yes you right, i tested it on a Mint Linux and it works!
Thank you guys.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append a field to the end of each line of a file based on searching another file.

Hi All, I have two comma separated value(CSV) files, say FileA and FileB. The contents looks like that shown below. FileA EmpNo,Name,Age,Sex, 1000,ABC,23,M, 1001,DES,24,F, ... (2 Replies)
Discussion started by: ultimate
2 Replies

2. Shell Programming and Scripting

Add a new end of line

Hi, Does anyone know if its possible to add something like an end of line like c or java in unix? dirs=/home/nosnam var='' for dir in $dirs do listDirs=`ls -d1 $dir/*` for eachList in $listDirs do listRepos=`du -ks $eachList | awk '{ x+=$1 }; END { print x... (4 Replies)
Discussion started by: nosnam
4 Replies

3. UNIX for Advanced & Expert Users

Add line numbers to end of each line

Hi i would like to add line numbers to end of each line in a file. I am able to do it in the front of each line using sed, but not able to add at the end of the file. Can anyone suggest The following code adds line number to start of each line sed = filename | sed 'N;s/\n/\t/' how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies

4. Shell Programming and Scripting

To add a number at the end of the line

Hi Folks, Using the Vi, how can I add a numbers at the end of the line. For eg: I have the numbers in the file as: 58.125.33 22.58.68 25.144.225 114.25.38 I need to add .0/8 at the end of all the line. So, it should be like 58.125.33.0/8 22.58.68.0/8 25.144.225.0/8 114.25.38.0/8 (6 Replies)
Discussion started by: gsiva
6 Replies

5. Shell Programming and Scripting

how to add ; at the end of last line

hi, i have file which is having large sql query eg : i am executing this sql file but now i want to add ; after query on same line i.e. i should look like any idea how to achieve it ? (6 Replies)
Discussion started by: crackthehit007
6 Replies

6. Shell Programming and Scripting

Get the 1st 99 characters and add new line feed at the end of the line

I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed). AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies

7. Shell Programming and Scripting

Use sed to add comma to end of first field

Example data Gi1/10 Gi1/12 xl32lytscb07 3/11 to nyc 3/12 41764 ecomm 3/13 hxcsxsa 2/1 3/14 ziim570-rsvd 3/15 xl3NDSADM Po1 VPC trunk to xl3-i Po2 ***DO NOT ENABLE** Po13 *** VPC link to Po101 Po102 xl3-2lyg1accsgh-fe... (7 Replies)
Discussion started by: sumguy
7 Replies

8. Shell Programming and Scripting

Add line at the end

How to add a comma at the end of each line in this file?30 1412 30 3352 30 5254 30 5543 30 7478 3 28 3 30 3 39 3 54 3 108 3 152 3 178 3 182 3 214 3 271 3 286 3 300 3 348 3 349 3 371 (3 Replies)
Discussion started by: gunjan
3 Replies

9. Shell Programming and Scripting

How to add a character at end of line?

Hai, I have got a small requirement in my script. and i am using bash shell. I need to add a dot (.) for some particular line in a file. Say for example, $Cat rmfile 1 This is line1 2 This is line2 3 This is line3 O/p should be : $Cat rmfile 1 This is line1 2 This is line2. #... (2 Replies)
Discussion started by: Sivajee
2 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
HTML::Microformats::DocumentContext(3pm)		User Contributed Perl Documentation		  HTML::Microformats::DocumentContext(3pm)

NAME
HTML::Microformats::DocumentContext - context for microformat objects DESCRIPTION
Microformat objects need context when being parsed to properly make sense. For example, a base URI is needed to resolve relative URI references, and a full copy of the DOM tree is needed to implement the include pattern. Constructor "$context = HTML::Microformats::DocumentContext->new($dom, $baseuri)" Creates a new context from a DOM document and a base URI. $dom will be modified, so if you care about keeping it pristine, make a clone first. Public Methods "$context->cache" A Microformat cache for the context. This prevents the same microformat object from being parsed and reparsed - e.g. an adr parsed first in its own right, and later as a child of an hCard. "$context->document" Return the modified DOM document. "$context->uri( [$relative_reference] )" Called without a parameter, returns the context's base URI. Called with a parameter, resolves the URI reference relative to the base URI. "$context->document_uri" Returns a URI representing the document itself. (Usually the same as the base URI.) "$context->make_bnode( [$element] )" Mint a blank node identifier or a URI. If an element is passed, this may be used to construct a URI in some way. "$context->profiles" A list of profile URIs declared by the document. "$context->has_profile(@profiles)" Returns true iff any of the profiles in the array are declared by the document. "$context->add_profile(@profiles)" Declare these additional profiles. "$context->representative_hcard" Returns the hCard for the person that is "represented by" the page (in the XFN sense), or undef if no suitable hCard could be found "$context->representative_person_id( [$as_trine] )" Equivalent to calling "$context->representative_hcard->id($as_trine, 'holder')", however magically works even if $context->representative_hcard returns undef. "$context->contact_hcard" Returns the hCard for the contact person for the page, or undef if none can be found. hCards are considered potential contact hCards if they are contained within an HTML <address> tag, or their root element is an <address> tag. If there are several such hCards, then the one in the shallowest <address> tag is used; if there are several <address> tags equally shallow, the first is used. "$context->contact_person_id( [$as_trine] )" Equivalent to calling "$context->contact_hcard->id($as_trine, 'holder')", however magically works even if $context->contact_hcard returns undef. BUGS
Please report any bugs to <http://rt.cpan.org/>. SEE ALSO
HTML::Microformats AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2008-2011 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. perl v5.14.2 2011-12-17 HTML::Microformats::DocumentContext(3pm)
All times are GMT -4. The time now is 06:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy