Sponsored Content
Top Forums UNIX for Dummies Questions & Answers delete a line based on first character of the line Post 91911 by borncrazy on Tuesday 6th of December 2005 01:15:10 PM
Old 12-06-2005
Question delete a line based on first character of the line

Hi,

I need to delete all lines in a file which starts with "|" character. Can some one assist me?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to delete last character of a line?

Hello, I think I'm close to doing this, but I could be wrong. I have a string I would like to search for and delete the last character of the that line. This is what I have... sed 's/POHEAD\(.\)$//g' tempd > tempe The above works if I search for P, but that won't work. I need to search... (2 Replies)
Discussion started by: ctcuser
2 Replies

2. Shell Programming and Scripting

script to delete character in a line

Hi, Please help me to edit a file, with the following changes, 1) serach for XYZ , appears at the start of line, delete a character present in specified column number in a line. 2) This needs to be repeated in multiple rows and not the entire file Thanks (1 Reply)
Discussion started by: abc_81
1 Replies

3. Shell Programming and Scripting

Read line based on character,

Hi Experts, I have called file1.txt contains below CREATE TABLE "IHUBDEV2"."TLM_BREAK_RULES" ( "OID" VARCHAR2(32) NOT NULL ENABLE, "TLM_PAY_CLASS_OID" VARCHAR2(32) NOT NULL ENABLE, "PUNCHED_BREAKS" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE, "NORMAL_BREAKS"... (3 Replies)
Discussion started by: naree
3 Replies

4. Shell Programming and Scripting

delete new line character ( - ) , korn shell

Hi guys , i need help so bad on this issue.. Basically i have to delete the line continuation symbol of first column variable and add the truncated part of that word in next line to first line. here i written sample 3 lines but originally i have bunch of lines in that file. client1_day- ... (3 Replies)
Discussion started by: chrismorgan
3 Replies

5. Shell Programming and Scripting

how to delete extra character in a line?

And I want to delete the characters longer than 20 for each line start with #. The other lines should remain the same. I think this can be done by sed. Could anyone help me with this? Thanks! my input file: #ZP_05494889.1_Clostridium_papyrosolvens... (3 Replies)
Discussion started by: ritacc
3 Replies

6. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

7. Shell Programming and Scripting

Delete line based on count of specific character

I'm looking for what I hope might be a one liner along these lines: sed '/a line with more than 3 pipes in it/d' I know how to get the pipe count in a string and store it in a variable, but I'm greedy enough to hope that it's possible via regex in the /.../d context. Am I asking too much? ... (5 Replies)
Discussion started by: tiggyboo
5 Replies

8. Shell Programming and Scripting

Sed: delete on each line before a character and after a character

Hi there, A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis). The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies

9. UNIX for Beginners Questions & Answers

Cut each line based on the character size

Hello All, I have a file which contain below lines. The starting word of each line is call and the end line is semi colon. I need to find the character size of each line and then move it to a file. If the character size is more than 255 then I need to push that line to a next file and I need... (6 Replies)
Discussion started by: JoshvaPeter
6 Replies

10. UNIX for Beginners Questions & Answers

Append each line based upon the character size

I have a huge file which contains multiple lines. It need to check whether character length is not more than 255 each line. If its not then it should remove the character up to column. I have described in the output below. If its more than that the next line should start with call but if the... (1 Reply)
Discussion started by: JoshvaPeter
1 Replies
CHARMAP(5)						     Linux Programmer's Manual							CHARMAP(5)

NAME
charmap - character set description file DESCRIPTION
A character set description (charmap) defines all available characters and their encodings in a character set. localedef(1) can use charmaps to create locale variants for different character sets. Syntax The charmap file starts with a header that may consist of the following keywords: <code_set_name> is followed by the name of the character map. <comment_char> is followed by a character that will be used as the comment character for the rest of the file. It defaults to the number sign (#). <escape_char> is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be interpreted in a special way. It defaults to the backslash (). <mb_cur_max> is followed by the maximum number of bytes for a character. The default value is 1. <mb_cur_min> is followed by the minimum number of bytes for a character. This value must be less than or equal than <mb_cur_max>. If not speci- fied, it defaults to <mb_cur_max>. The character set definition section starts with the keyword CHARMAP in the first column. The following lines may have one of the two following forms to define the character set: <character> byte-sequence comment This form defines exactly one character and its byte sequence, comment being optional. <character>..<character> byte-sequence comment This form defines a character range and its byte sequence, comment being optional. The character set definition section ends with the string END CHARMAP. The character set definition section may optionally be followed by a section to define widths of characters. The WIDTH_DEFAULT keyword can be used to define the default width for all characters not explicitly listed. The default character width is 1. The width section for individual characters starts with the keyword WIDTH in the first column. The following lines may have one of the two following forms to define the widths of the characters: <character> width This form defines the width of exactly one character. <character>...<character> width This form defines the width for all the characters in the range. The width definition section ends with the string END WIDTH. FILES
/usr/share/i18n/charmaps Usual default character map path. CONFORMING TO
POSIX.2. EXAMPLE
The Euro sign is defined as follows in the UTF-8 charmap: <U20AC> /xe2/x82/xac EURO SIGN SEE ALSO
iconv(1), locale(1), localedef(1), locale(5), charsets(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2016-07-17 CHARMAP(5)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy