Hi all,
I am trying to figure out the syntx to delete multiple lines w/ sed. I know the following syntax will delete lines 1 THROUGH 5 from filex:
sed 1,5d filex
But I wan to delete lines 1 AND 5 (keeping lines 2,3, and 4). Does anyone know how to do this in a single sed statement?
... (2 Replies)
I have been reading through the sed one liners, trying to understand what is happening.
# delete the last 2 lines of a file
sed 'N;$!P;$!D;$d'
The above will delete the last 2 line of a file. I tried analyzing what happens. And I got lost :(
This is what I understood so far from the... (2 Replies)
hello all
I have bunch of files containing lines of text that surrounding by <# .......#> tags
I like to delete this lines from the text files whiteout open the files , can it be done with sed ?
or other unix tool (perl mybe )? (2 Replies)
I have a text file with blank lines fullfilled with spaces and others only containing the "Enter" caracter, the \012.
I would like to eliminate all them with the sed command.
Is it possible?
making: sed '/^$/d' <file should delete the blank lines but doesn't work for the lines that only... (2 Replies)
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
which contains
some lines
another line... (11 Replies)
Hi All,
I have one /etc/hosts.equiv file which has following entries
##########
wcars42g admin
wcars42b netmgr
wcars42b oemssrvr
wcars42f admin
wcars42f netmgr
wcars42f oemssrvr
##########
I am trying to delete lines starting from wcars42b.... (1 Reply)
Hi,
I'm very new to Sed and I have a very large file that contains data in the following way
(*064) 1 4 10
(*064) simulation time = 0.12000E-05
(*064) 1 2 10
(*064) 1 3 10Essentially what I want to do it delete every line that starts with
'(*064) 1'I tried the following,
... (2 Replies)
Hello everyone I'm doing a program in bash and wanted to know how can I do to delete document lines the words not ending in S with SED, ie, show only those ending with the letter S.
I probe with:
sed -e /$.*/d "$file" | more
to delete all lines NOT ending in S but not work!... (3 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Hi Members,
This is my first post in this forum.
I want to do is match form feed lines one by one in a file and delete the next n lines (ex-3 lines) with the form feed character
Eg - Files looks like
Data 1
Data 2
Data 3
FF
Hdr1
Hdr2
Hdr3
Data4
Data5
FF
Hdr1
Hdr2
Hdr3 (9 Replies)
Discussion started by: yohan
9 Replies
LEARN ABOUT SUNOS
pck
PCK(5) Standards, Environments, and Macros PCK(5)NAME
PCK, pck - map between PCK and character set
DESCRIPTION
PCK stands for PC Kanji code. It is also known as Shift-JIS (MS kanji) code. This manual page shows map between PCK and character set.
PCK allocates the first byte of each kanji code which corresponds to JIS X0208-1990 and so on to the code other than code range of
0x00-0x7f and 0xa1-0xdf. The following is a map table for PCK and character set.
+-----------------------------------------------------------+
|PCK character set |
|0x00 - 0x19 JIS X 0201-1976 function |
| character set |
|0x20 JIS X 0201-1976 space char- |
| acter |
|0x21 - 0x7e JIS X 0201-1976 figure |
| character set for roman |
| character |
|0x7f JIS X 0201-1976 erase char- |
| acter |
|0xa1 - 0xdf JIS X 0201-1976 figure |
| character set for katakana |
| (except for an area of |
| undefined character E/0 - |
| F/14) |
|0x8140 - 0x817e JIS X 0208-1990 (1 ku 1 |
| ten - 1 ku 63 ten) |
|0x8180 - 0x819e JIS X 0208-1990 (1 ku 64 |
| ten - 1 ku 94 ten) |
|0x819f - 0x81fc JIS X 0208-1990 (2 ku 1 |
| ten - 2 ku 94 ten) |
| : : |
| : : |
|0x9f9f - 0x9ffc JIS X 0208-1990 (62 ku 1 |
| ten - 62 ku 94 ten) |
|0xe040 - 0xe07e JIS X 0208-1990 (63 ku 1 |
| ten - 63 ku 63 ten) |
| : : |
| : : |
|0xea40 - 0xea7e JIS X 0208-1990 (83 ku 1 |
| ten - 83 ku 63 ten) |
|0xea80 - 0xea9e JIS X 0208-1990 (83 ku 64 |
| ten - 83 ku 94 ten) |
|0xea9f - 0xeafc JIS X 0208-1990 (84 ku 1 |
| ten - 84 ku 94 ten) |
+-----------------------------------------------------------+
The differences from character set of Japanese EUC are,
o Character set of Japanese EUC codeset 3 (JIS X 0212-1990) is not assigned except a part of Vender Defined Character (IBM extension
character) (see NOTES).
o Character set which corresponds to Japanese EUC C1 control code is not assigned.
NOTES
In PCK area below has special meaning.
+---------------------------------------------------------------------------+
|PCK area of character set meaning |
|0x8740 - 0x879e JIS X 0208-1990 13 ku Vender Defined Character |
| (special symbols) |
|0xeb40 - 0xecfc Invalid |
|0xed40 - 0xeffc Vender Defined Character |
| (IBM extension character NEC |
| selected) |
|0xf040 - 0xf9fc User Defined Character |
| 1 ku - 20 ku |
|0xfa40 - 0xfcfc Vender Defined Character |
| (IBM extension character) |
+---------------------------------------------------------------------------+
SEE ALSO eucJP(5)SunOS 5.10 6 Jan 1999 PCK(5)