Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Formating/inserting the content Post 302364072 by vino_hymi on Thursday 22nd of October 2009 11:05:28 PM
Old 10-23-2009
Data

It works perfectly.Smilie

Thanks a lot.

---------- Post updated 10-23-09 at 08:35 AM ---------- Previous update was 10-22-09 at 12:52 PM ----------

Whether there is any scope to remove the filename(including blank spaces) in the second line before Status string.
Present:
Code:
Working file: /common/servererror.jsp
servererror.jsp  Status: File had conflicts on merge
date: 2009/09/30 12:40:02; author: guest1
Including Susie's comments for servererror copy change

Required:
Code:
Working file: /common/servererror.jsp
Status: File had conflicts on merge
date: 2009/09/30 12:40:02; author: guest1
Including Susie's comments for servererror copy change

I tried by using sed command as below but unable to make it.

Code:
sed 's/^[0-9a-zA-z_-][.][ ]Status:/Status:/g'



can some one correct me.

Last edited by vino_hymi; 10-23-2009 at 08:10 AM.. Reason: Elaborated
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formating output

I have a file proc.txt which contains the below one. Content-type: text/html <H2>No query</H2> infodba-marabou:/tmp => export QUERY_STRING="IMAN_server_report=full" infodba-marabou:/tmp => $IMAN_ROOT/web/htdocs/cgi-bin/iman > /tmp/proc.txt infodba-marabou:/tmp => cat proc.txt... (20 Replies)
Discussion started by: Krrishv
20 Replies

2. Shell Programming and Scripting

Output formating

Dear All I am stuck in one problem. Kindly help me. I am taking below mention file as input file and want some op file as mention below. Kindly send me all possible suggestion and query. Thnaks Jaydeep bELOW IS THE INPUT FILE: *** Connected to BSCANGR ***... (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

3. Shell Programming and Scripting

formating output

Hi all, I want to start a new topic on this matter I have this script, #!perl use strict; use warnings; use Data::Dumper; open my $log, '>', 'log-external.txt' or die "Could not open log: $!"; print $log "Subnet,Static,DHCP,Unused\n"; open my $dump, '>', 'dump.log' or die... (2 Replies)
Discussion started by: richsark
2 Replies

4. Shell Programming and Scripting

Text formating

Dear all I had input file as mention below and want op as mention. Kindly let me knw possible ways. Regards Jaydeep INPUT: RXOTX-48-1 2A 34 2B 35 RXOTX-499-2 2C 32 RXOTX-4-1 2D 23 OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

5. Shell Programming and Scripting

Formating output

Hello Team i have a file with following data (as columns). I need implement a syntax like below for altering table ALTER TABLE1 TABLENAME ADD COLUMN COL1 CHAR(5) NOT NULL WITH DEFAULT ADD COLUMN COL2 CHAR(5) .. .. ADD COLUMN COLn CHAR(5) NOT NULL... (1 Reply)
Discussion started by: rocking77
1 Replies

6. Shell Programming and Scripting

Inserting file content into a searched pattern

Hi, i have to insert the content of source.txt into the searched pattern of the file second.txt. $cat source.txt One Two Three . . $cat second.txt This is second file pattern match start here pattern match end here end of the file so the result will be like this (4 Replies)
Discussion started by: posix
4 Replies

7. Shell Programming and Scripting

Facing issues with Content-Type:application/x-download Content-Disposition:attachment

I am in the process of developing a perl cgi page. I had succeeded in developing the page but there are few errors/issues with the page. description about cgi page: My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies

8. Shell Programming and Scripting

Formating questions

Hi, I have a data as follows in some files, i want to change CHAR(2-20) to VARCHAR(2-20). I should not touch any line with CHAR(1) Example: Input: cur_rev_stage_cd CHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, prev_rev_stage_cd CHAR(5) CHARACTER SET LATIN NOT... (7 Replies)
Discussion started by: srikanth38
7 Replies

9. UNIX for Beginners Questions & Answers

File formating help

Hi all, I am having the file below I need that as below Thanks, Arun (12 Replies)
Discussion started by: arunkumar_mca
12 Replies

10. Shell Programming and Scripting

File formating

I need to create a fixed width file based on the column lengths. lets assume I have six(this may be dynamic) fields each are of different length column1=6 #size of the column column2=3 column3=2 column4=3 column5=4 column6=5 I tried below code snippet but it is not working echo... (4 Replies)
Discussion started by: gvkumar25
4 Replies
Dist::Zilla::Plugin::GenerateFile(3pm)			User Contributed Perl Documentation		    Dist::Zilla::Plugin::GenerateFile(3pm)

NAME
Dist::Zilla::Plugin::GenerateFile - build a custom file from only the plugin configuration VERSION
version 4.300020 SYNOPSIS
In your dist.ini: [GenerateFile] filename = todo/master-plan.txt is_template = 1 content = # Outlines the plan for world domination by {{$dist->name}} content = content = Item 1: Think of an idea! content = Item 2: ? content = Item 3: Profit! DESCRIPTION
This plugin adds a file to the distribution. You can specify the content, as a sequence of lines, in your configuration. The specified content might be literal, or might be a Text::Template template. Templating of the content If you provide a "is_template" parameter of "1", The content will also be run through Text::Template. The variables $plugin and $dist will be provided, set to the GenerateFile plugin and the Dist::Zilla object respectively. ATTRIBUTES
filename This attribute names the file you want to generate. It is required. content The "content" attribute is an arrayref of lines that will be joined together with newlines to form the file content. is_template This attribute is a bool indicating whether or not the content should be treated as a Text::Template template. By default, it is false. AUTHOR
Ricardo SIGNES <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-21 Dist::Zilla::Plugin::GenerateFile(3pm)
All times are GMT -4. The time now is 09:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy