Sponsored Content
Top Forums Shell Programming and Scripting Add 'ENDEND' on end of each record at position is 14-20 Post 302227374 by vidyadhar85 on Thursday 21st of August 2008 05:18:55 AM
Old 08-21-2008
Quote:
Originally Posted by summer_cherry
Code:
cat file | sed '/EDPPOO/ i\
ENDEND
'

but this will add ENDEND in first line also..
i mean
ENDEND
01 ASH01 1CTCTL EDPPOO STAND
01 ASH08 0020 A1TH 101
01 ASH09 0022 A1TH 102
01 ASH09 0022 A1TH 103
ENDEND
01 ASH02 2CTCTL EDPPOO STAND
01 ASH08 0030 A1TH 201
01 ASH09 0042 A1TH 302
01 ASH09 0052 A1TH 403
ENDEND
01 ASH03 1CTCTL EDPPOO STAND
01 ASH08 0020 A1TH 401
01 ASH09 0022 A1TH 502
01 ASH09 0022 A1TH 603
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check position of end of line(URGENT PLS)

I Have to check in a file that all the lines are ending at same posiotin. Ex : line 1 is ending at position 88 line 2 should at same position i.e 88 Thanks in advance (6 Replies)
Discussion started by: evvander
6 Replies

2. Shell Programming and Scripting

MERGE 13 files and add the file name at the end of each record

Hi Gurus, I have 13 comma(,) seperated files that i have to merge and create a single file which has file name attached at th end of each record in the out put file. Can any one please help me with writing a unix script with this issue? test1.dat BIG ID,Local ID,Bond... (2 Replies)
Discussion started by: vkr
2 Replies

3. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

4. Shell Programming and Scripting

Subsitute from a position till end of line.

Hi, Having a following file's content, lets say: ABC|ANA|LDJ|||||DKD|||||| AJJ|KKDD||KKDK|||||||||||| KKD||KD|||LLLD||||LLD||||| Problem: Need to replace pipes from 8th occurrence of pipe till end. so the result should be: ABC|ANA|LDJ|||||DKD AJJ|KKDD||KKDK|||| ------- ------- ... (12 Replies)
Discussion started by: _Noprofi
12 Replies

5. Shell Programming and Scripting

how to add blank spaces at the end of every record in a file.

hi, Does anyone has any idea in adding few blank spaces at the end of every record in a file. Eg: file.txt Baby Boy Kim 1234 Baby Boy Vik 1334 Desired output:- output.txt Baby Boy Kim 1234 Baby Boy Vik 1334 I want to add 10 blank spaces at the end every record in file.txt (3 Replies)
Discussion started by: techmoris
3 Replies

6. Shell Programming and Scripting

Search and Replace by record position

Hi All, I have a file that I would like to search for data and replace other data by record position number: Example search.. search for "CLARK KENT" and replace Amt data "000025" with "000155"??? I'm able to search and replace unique data but, came to a stump when wanting to replace data... (11 Replies)
Discussion started by: macastor
11 Replies

7. Shell Programming and Scripting

How to add trailer record at the end of the flat file in the unix ksh shell scripting?

Hi, How to add trailer record at the end of the flat file in the unix ksh shell scripting can you please let me know the procedure Regards Srikanth (3 Replies)
Discussion started by: srikanth_sagi
3 Replies

8. Shell Programming and Scripting

Require original field position after sorting the values in a record

Dear Team, Can any body help me out to get the filed position of the records post sorting using AWK programming. Thanks in advance Example Input: StudentID col-1 col-2 col-3 col-4 1234 14 10 12 13 1235 10 11 12 13 1236 13 12 11 10 ... (3 Replies)
Discussion started by: Srinivasa Reddy
3 Replies

9. Shell Programming and Scripting

Retrieving sequences corresponding to start and end position

Hi all, I have a fasta file of a reference sequnce, I will like to retrieve sequences corresponding to a list of start and end position in another file >my_ref_seq GCCCTATAAGGGCAGAAGCTTGTCCTTCTTGTGCCAGTTATGACGTTTGTCCTAACTGCACATCTGGTAG... (4 Replies)
Discussion started by: Ibk
4 Replies

10. UNIX for Beginners Questions & Answers

Shift record from one position to another

Hi All, I have a file and it is a fixed length file. I want to move the values from 42,6 ( where 6 is length) to the 36th position Original file: 00000100000100000100000100000100001 000870 ... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
HTTP::Status(3pm)					User Contributed Perl Documentation					 HTTP::Status(3pm)

NAME
HTTP::Status - HTTP Status code processing SYNOPSIS
use HTTP::Status qw(:constants :is status_message); if ($rc != HTTP_OK) { print status_message($rc), " "; } if (is_success($rc)) { ... } if (is_error($rc)) { ... } if (is_redirect($rc)) { ... } DESCRIPTION
HTTP::Status is a library of routines for defining and classifying HTTP status codes for libwww-perl. Status codes are used to encode the overall outcome of an HTTP response message. Codes correspond to those defined in RFC 2616 and RFC 2518. CONSTANTS
The following constant functions can be used as mnemonic status code names. None of these are exported by default. Use the ":constants" tag to import them all. HTTP_CONTINUE(100) HTTP_SWITCHING_PROTOCOLS(101) HTTP_PROCESSING(102) HTTP_OK(200) HTTP_CREATED(201) HTTP_ACCEPTED(202) HTTP_NON_AUTHORITATIVE_INFORMATION(203) HTTP_NO_CONTENT(204) HTTP_RESET_CONTENT(205) HTTP_PARTIAL_CONTENT(206) HTTP_MULTI_STATUS(207) HTTP_ALREADY_REPORTED(208) HTTP_MULTIPLE_CHOICES(300) HTTP_MOVED_PERMANENTLY(301) HTTP_FOUND(302) HTTP_SEE_OTHER(303) HTTP_NOT_MODIFIED(304) HTTP_USE_PROXY(305) HTTP_TEMPORARY_REDIRECT(307) HTTP_BAD_REQUEST(400) HTTP_UNAUTHORIZED(401) HTTP_PAYMENT_REQUIRED(402) HTTP_FORBIDDEN(403) HTTP_NOT_FOUND(404) HTTP_METHOD_NOT_ALLOWED(405) HTTP_NOT_ACCEPTABLE(406) HTTP_PROXY_AUTHENTICATION_REQUIRED(407) HTTP_REQUEST_TIMEOUT(408) HTTP_CONFLICT(409) HTTP_GONE(410) HTTP_LENGTH_REQUIRED(411) HTTP_PRECONDITION_FAILED(412) HTTP_REQUEST_ENTITY_TOO_LARGE(413) HTTP_REQUEST_URI_TOO_LARGE(414) HTTP_UNSUPPORTED_MEDIA_TYPE(415) HTTP_REQUEST_RANGE_NOT_SATISFIABLE(416) HTTP_EXPECTATION_FAILED(417) HTTP_I_AM_A_TEAPOT(418) HTTP_UNPROCESSABLE_ENTITY(422) HTTP_LOCKED(423) HTTP_FAILED_DEPENDENCY(424) HTTP_NO_CODE(425) HTTP_UPGRADE_REQUIRED(426) HTTP_PRECONDITION_REQUIRED(428) HTTP_TOO_MANY_REQUESTS(429) HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE(431) HTTP_RETRY_WITH(449) HTTP_INTERNAL_SERVER_ERROR(500) HTTP_NOT_IMPLEMENTED(501) HTTP_BAD_GATEWAY(502) HTTP_SERVICE_UNAVAILABLE(503) HTTP_GATEWAY_TIMEOUT(504) HTTP_HTTP_VERSION_NOT_SUPPORTED(505) HTTP_VARIANT_ALSO_NEGOTIATES(506) HTTP_INSUFFICIENT_STORAGE(507) HTTP_BANDWIDTH_LIMIT_EXCEEDED(509) HTTP_NOT_EXTENDED(510) HTTP_NETWORK_AUTHENTICATION_REQUIRED(511) FUNCTIONS
The following additional functions are provided. Most of them are exported by default. The ":is" import tag can be used to import all the classification functions. status_message( $code ) The status_message() function will translate status codes to human readable strings. The string is the same as found in the constant names above. If the $code is unknown, then "undef" is returned. is_info( $code ) Return TRUE if $code is an Informational status code(1xx). This class of status code indicates a provisional response which can't have any content. is_success( $code ) Return TRUE if $code is a Successful status code(2xx). is_redirect( $code ) Return TRUE if $code is a Redirection status code(3xx). This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. is_error( $code ) Return TRUE if $code is an Error status code (4xx or 5xx). The function returns TRUE for both client and server error status codes. is_client_error( $code ) Return TRUE if $code is a Client Error status code(4xx). This class of status code is intended for cases in which the client seems to have erred. This function is not exported by default. is_server_error( $code ) Return TRUE if $code is a Server Error status code(5xx). This class of status codes is intended for cases in which the server is aware that it has erred or is incapable of performing the request. This function is not exported by default. BUGS
For legacy reasons all the "HTTP_" constants are exported by default with the prefix "RC_". It's recommended to use explicit imports and the ":constants" tag instead of relying on this. perl v5.14.2 2012-02-16 HTTP::Status(3pm)
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy