Sponsored Content
Top Forums Shell Programming and Scripting how to add single digit in front of the word and line in the file. Post 302513111 by krbala1985 on Tuesday 12th of April 2011 11:11:21 AM
Old 04-12-2011
Hi,

Thanks!.
but i want output similar but slightly changes....in the output file need this type..

4muthu is good boy
3raja is bad boy
selvam in super boy
then 2bala is very good boy

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Append 0 for single digit entered from command line

I have a script like this-- #!/bin/ksh echo "To pad a 0 before digits from 1-9" for i in $* do echo $i | sed 's//'0'/g' done I run this script as ksh name 1 2 23 34 The output should be 01 02 23 34 Help me in modifying this script. Thanks Namish (2 Replies)
Discussion started by: namishtiwari
2 Replies

2. Shell Programming and Scripting

Adding a word in front of a word of each line.

Adding a word in front of a word of each line.In that line only one word will be there. pl help:( (4 Replies)
Discussion started by: Ramesh Vellanki
4 Replies

3. Shell Programming and Scripting

Want to add a word in front a of each line of a file

Hi, Can anybody help me how to add a word in front of a line in a file.Actually it is bit tricky to add a word. i will give a sample for this: Input : 1110001 ABC DEF 1110001 EFG HIJ 1110001 KLM NOP 1110002 QRS RST 1110002 UVW XYZ Output: %HD% 1110001 ABC DEF %DT% 1110001 EFG HIJ... (4 Replies)
Discussion started by: apjneeraj
4 Replies

4. Shell Programming and Scripting

Place digit in front of the line searching pattern using sed command

hi All, i want to add the single digit front of the line in the report file and string compare with pattern file. patter file: pattern1.txt pattern num like 4 love 3 john 2 report file: report.txt i like very much but john is good boy i will love u so after execute... (9 Replies)
Discussion started by: krbala1985
9 Replies

5. Shell Programming and Scripting

Script for adding a word in front of all line in a file

Hi I've one file full of paths of certain files and I want to add some extra file words in front of all the paths. for eg: i have a file name test.txt which show some details only.. 024_hd/044/0344eng.txt 035_bv/222/editor.jpg here I want to add /usr/people/indiana/ infront of all the... (4 Replies)
Discussion started by: ratheeshp
4 Replies

6. Shell Programming and Scripting

word counts for a single line xml file

I have any XML ouput file(file name TABLE.xml), where the data is loaded in A SINGLE LINE, I need help in writting a ksh shell script which gives me the word counts of word <TABLE-ROW> This is my input file. <?xml version="1.0" encoding="UTF-8"?><!--Generated by Ascential Software... (4 Replies)
Discussion started by: pred55
4 Replies

7. Shell Programming and Scripting

how to delete the line if the first letter is a single digit

Hi, I'm trying to acheive the following, I have a dat file in which i have several addresses, If the address starts with a single digit then i have to delete the line, if it starts with 2 or more digits then i have to keep the line Here is a sample of my file: 377 CARRER DE LA... (5 Replies)
Discussion started by: ramky79
5 Replies

8. Shell Programming and Scripting

convert two digit in to single digit...

Hi Guys. My Input: ABCD 12 00 KL ABCD 12 08 DL ABCD 12 10 KK ABCD 12 04 LL ABCD 13 00 LP ABCD 13 1O LS Output: ABCD 12 0 KL ABCD 12 8 DL ABCD 12 10 KK ABCD 12 4 LL ABCD 13 0 LP (2 Replies)
Discussion started by: pareshkp
2 Replies

9. Shell Programming and Scripting

Insert a single quote in front of a line in vi editor

Hello Gurus, I wanted to put a single quote in every where starting with /oradata, and at the end with .dbf. For example I have one line as below: alter database rename datafile /oradata/test.dbf to /oradata_new/test.dbf I wanted as below alter database rename datafile '/oradata/test.dbf' to... (3 Replies)
Discussion started by: pokhraj_d
3 Replies

10. Shell Programming and Scripting

Checking a single digit in a file using Grep

Hi All, I have a file which keeps count based on completion of a certain activity. I am using the following grep command to return a '1' in case the count is zero grep -ic "0" abc_count.txt Now the issue happens when the count is '10', '20' etc .. in these cases as well it returns a... (5 Replies)
Discussion started by: dev.devil.1983
5 Replies
Text::Trac(3pm) 					User Contributed Perl Documentation					   Text::Trac(3pm)

NAME
Text::Trac - Perl extension for formatting text with Trac Wiki Style. VERSION
Version 0.12 SYNOPSIS
use Text::Trac; my $parser = Text::Trac->new( trac_url => 'http://trac.mizzy.org/public/', disable_links => [ qw( changeset ticket ) ], ); $parser->parse($text); print $parser->html; DESCRIPTION
Text::Trac parses text with Trac WikiFormatting and convert it to html format. METHODS
new Constructs Text::Trac object. Available arguments are: trac_url Base URL for TracLinks.Default is /. You can specify each type of URL individually. Available URLs are: trac_attachment_url trac_changeset_url trac_log_url trac_milestone_url trac_report_url trac_source_url trac_ticket_url trac_wiki_url disable_links Specify TracLink types you want to disable. All types are enabled if you don't specify this option. my $parser = Text::Trac->new( disable_links => [ qw( changeset ticket ) ], ); enable_links Specify TracLink types you want to enable.Other types are disabled. You cannot use both disable_links and enable_links at once. my $parser = Text::Trac->new( enable_links => [ qw( changeset ticket ) ], ); parse Parses text and converts it to html format. process An alias of parse method. html Return converted html string. SEE ALSO
Text::Hatena Trac <http://www.edgewall.com/trac/> Trac WikiFormatting <http://projects.edgewall.com/trac/wiki/WikiFormatting> AUTHORS
Gosuke Miyashita, "<gosukenator at gmail.com>" Hideaki Tanaka, "<drawn.boy at gmail.com)>" BUGS
Please report any bugs or feature requests to "bug-text-trac at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Trac>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Text::Trac You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Text-Trac> o CPAN Ratings <http://cpanratings.perl.org/d/Text-Trac> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Trac> o Search CPAN <http://search.cpan.org/dist/Text-Trac> COPYRIGHT &; LICENSE Copyright 2006 Gosuke Miyashita, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-03-08 Text::Trac(3pm)
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy