Sponsored Content
Top Forums Shell Programming and Scripting Manipulating word based off of contents Post 302373154 by Scott on Thursday 19th of November 2009 02:16:35 PM
Old 11-19-2009
Code:
sed "/^Key/s/\w[a-z0-9]*@[a-z0-9]*[ ,]*//g" file1

Key: hsfkfs,  sfsfdsdfk...334, joe
Joe:  hp-0098, fhnjf@jhgsg,  shg@hjgppp

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using first word and print their contents using awk

suppose u hava a file G1354R tGGC-CGC D1361N cGAC-AAC I1424T ATC-ACC R768W gCGG-TGG Q1382R CAG-CGG Q178E gCAG-GAG Y181C TAC-TGC .........cont. So the question is By searching for first word i.e.character say R output shud be R768W gCGG-TGG R182P CGG-CCG R189W ... (6 Replies)
Discussion started by: cdfd123
6 Replies

2. Shell Programming and Scripting

need help with finding a word in file's contents

Hi, I need to check if a particular name is already in the file or not and i am using following code for this... match=$(grep -n -e "$output1" outputfiles.txt ) where output1 is the variable name having names in it and outputfiles.txt is the file name ..and i am using ksh can anybosy... (6 Replies)
Discussion started by: manmeet
6 Replies

3. Shell Programming and Scripting

parsing a file and manipulating the contents

Hi I have a text file as follows BOB 14/14 TOM 94/94 SAM 3/3 CRIS 13/13 TOM 6/6 CRIS 27/27 SAM 2/2 JACK 25/25 CRIS (6 Replies)
Discussion started by: shellignorant
6 Replies

4. Shell Programming and Scripting

Merging files based on the contents

Hi, I have a file f1 having the contents as below select (<condn>) from dual I have another file f2 having the contents as below 1, 2, 3 I want to replace <condn> in f1 with the contents of f2 I tried using sed like this sed "s:<condn>:`cat f2`:g" f1 The above command resulted in sed:... (3 Replies)
Discussion started by: mr_manii
3 Replies

5. Shell Programming and Scripting

Renaming Files Based on Contents

Hello everyone, I currently have a situation which is causing me some issues for keeping up with certain files. I will explain this to the best of my abilities. I have a list of files as follows 50_REPORT_1111 - file contains the word Car 50_REPORT_2222 - file contains the word House... (15 Replies)
Discussion started by: DerangedNick
15 Replies

6. Shell Programming and Scripting

How to fetch rows based on line numbers or based on the beginning of a word?

I have a file which will have rows like shown below, ST*820*316054716 RMR*IV*11333331009*PO*40.31 REF*IV*22234441009*xsss471-2762 DTM*003*091016 ENT*000006 RMR*IV*2222234444*PO*239.91 REF*IV*1234445451009*LJhjlkhkj471-2762 </SPAN> DTM*003* 091016 RMR*IV*2223344441009*PO*40.31... (18 Replies)
Discussion started by: Muthuraj K
18 Replies

7. Shell Programming and Scripting

Remove specific word from data contents problem asking

Hi, Below is my input file: >tempZ_1 SAFSDAFDSG GGERRTTZZZ ZASRARARET WETPOASDAZ ZZZASASFAS >temp_9 ASAEGPIOEO EIOPIZZZAS FDFGZZZARA ESEAZZZAAS . . Desired output file: (9 Replies)
Discussion started by: patrick87
9 Replies

8. Shell Programming and Scripting

copy contents of unix file to Word document

Hello, I have a unix file about 3000lines which i want to copy from and paste it into a Word document. If i cat the file and try to scroll through it then not everything is captured so i am getting and incomplete paste. Any help is really appreciated. jak (2 Replies)
Discussion started by: jakSun8
2 Replies

9. UNIX Desktop Questions & Answers

Manipulating a list of numbers based on values

Hi, I have a single column of numbers from in tabulated text format ranging from 0 to 1. I want to manipulate the list of numbers so that if the number is greater than 0.5 (> 0.5), I get 1 - number. If the number is less than 0.5, the number is taken as it is and not altered. For example: ... (1 Reply)
Discussion started by: evelibertine
1 Replies

10. Shell Programming and Scripting

File comparison based on contents

Hi I have 2 files 1.del ---- 1,2,3,4,5 1,2,3,4,4 1,1,1,1,2 2.del ---- 1,2,3,4,5 1, 1,2,3,4,4 1,1,1,1,2 I need to compare the above two files in unix, as in the output should only tell the difference in contents as I should get only the line 1 ( from 2.del) , rest all lines are... (4 Replies)
Discussion started by: Ethen561
4 Replies
mchar_define_charset(3m17n)					 The m17n Library				       mchar_define_charset(3m17n)

NAME
mchar_define_charset - Define a charset. SYNOPSIS
MSymbol mchar_define_charset (const char * name, MPlist * plist) DESCRIPTION
Define a charset. The mchar_define_charset() function defines a new charset and makes it accessible via a symbol whose name is name. plist specifies parameters of the charset as below: o Key is Mmethod, value is a symbol. The value specifies the method for decoding/encoding code-points in the charset. It must be Moffset, Mmap (default), Munify, Msubset, or Msuperset. o Key is Mdimension, value is an integer The value specifies the dimension of code-points of the charset. It must be 1 (default), 2, 3, or 4. o Key is Mmin_range, value is an unsigned integer The value specifies the minimum range of a code-point, which means that the Nth byte of the value is the minimum Nth byte of code-points of the charset. The default value is 0. o Key is Mmax_range, value is an unsigned integer The value specifies the maximum range of a code-point, which means that the Nth byte of the value is the maximum Nth byte of code-points of the charset. The default value is 0xFF, 0xFFFF, 0xFFFFFF, or 0xFFFFFFFF if the dimension is 1, 2, 3, or 4 respectively. o Key is Mmin_code, value is an unsigned integer The value specifies the minimum code-point of the charset. The default value is the minimum range. o Key is Mmax_code, value is an unsigned integer The value specifies the maximum code-point of the charset. The default value is the maximum range. o Key is Mascii_compatible, value is a symbol The value specifies whether the charset is ASCII compatible or not. If the value is Mnil (default), it is not ASCII compatible, else compatible. o Key is Mfinal_byte, value is an integer The value specifies the final byte of the charset registered in The International Registry. It must be 0 (default) or 32..127. The value 0 means that the charset is not in the registry. o Key is Mrevision, value is an integer The value specifies the revision number of the charset registered in The International Registry. It must be 0..127. If the charset is not in The International Registry, the value is ignored. The value 0 means that the charset has no revision number. o Key is Mmin_char, value is an integer The value specifies the minimum character code of the charset. The default value is 0. o Key is Mmapfile, value is an M-text If the method is Mmap or Munify, a data that contains mapping information is added to the m17n database by calling the function mdatabase_define() with the value as an argument extra_info, i.e. the value is used as a file name of the data. Otherwise, this parameter is ignored. o Key is Mparents, value is a plist If the method is Msubset, the value must is a plist of length 1, and the value of the plist must be a symbol representing a parent charset. If the method is Msuperset, the value must be a plist of length less than 9, and the values of the plist must be symbols representing subset charsets. Otherwise, this parameter is ignored. o Key is Mdefine_coding, value is a symbol If the dimension of the charset is 1, the value specifies whether or not to define a coding system of the same name whose type is Mcharset. A coding system is defined if the value is not Mnil. Otherwise, this parameter is ignored. RETURN VALUE
If the operation was successful, mchar_define_charset() returns a symbol whose name is name. Otherwise it returns Mnil and assigns an error code to the external variable merror_code. ERRORS
MERROR_CHARSET COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mchar_define_charset(3m17n)
All times are GMT -4. The time now is 07:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy