Sponsored Content
Full Discussion: UNIX file handling issue
Top Forums Shell Programming and Scripting UNIX file handling issue Post 302730981 by RudiC on Wednesday 14th of November 2012 03:28:39 AM
Old 11-14-2012
Try to extend ctsgnb's code like
Code:
awk -F";" 'NF>=50{$50=9006}1' RS="|" OFS=";" ORS="|" yourfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File handling in UNIX

Hi All, I want to read a file in UNIX line by line. Can u suggest me any command for this? (4 Replies)
Discussion started by: VENC22
4 Replies

2. Shell Programming and Scripting

File handling, getopts command in unix

I need to create a shell script having the menu with few options such as 1. Listing 2. Change permissions 3. Modify Contents 4. Delete Files 5. Exit 1. For 1. Listing: Display a special listing of files showing their date of modification and access time (side by side) along with their... (2 Replies)
Discussion started by: bab123
2 Replies

3. Shell Programming and Scripting

Performance issue in UNIX while generating .dat file from large text file

Hello Gurus, We are facing some performance issue in UNIX. If someone had faced such kind of issue in past please provide your suggestions on this . Problem Definition: /Few of load processes of our Finance Application are facing issue in UNIX when they uses a shell script having below... (19 Replies)
Discussion started by: KRAMA
19 Replies

4. UNIX for Dummies Questions & Answers

File Handling in UNIX

Hi all, I have a requirement here where I am dealing with a dynamic file. Each record in the file can contain anywhere between 1(min) to 42(max) Reject codes. For example I may have one record in the file having 3 reject codes and another record having 5 reject codes. The reject codes will be... (2 Replies)
Discussion started by: sujainarayan
2 Replies

5. Shell Programming and Scripting

UNIX File handling -Issue in reading a file

I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
1 Replies

6. Shell Programming and Scripting

Issue with Error handling,not able to continue the script further

Hi, I am trying to write a script to cleanup files in a log directory .. cd log find Datk** -mtime +7 -exec rm -f {} \; 2> /dev/null Have used the above to clean up files in log directory more then 7 days older. The file can be something like ( auto-generate by some processes and... (2 Replies)
Discussion started by: nss280
2 Replies

7. UNIX for Dummies Questions & Answers

Large file data handling issue

I have a single record large file, semicolon ';' and pipe '|' separated. I am doing a vi on the file. It is throwing an error "File to long" I need to actually remove the last | symbol from this file. sed -e 's/\|*$//' filename is working fine for small files. But not working on this big... (13 Replies)
Discussion started by: Gurkamal83
13 Replies

8. Shell Programming and Scripting

ISSUE in handling multiple same name files :-(

Dear all, My work is completely stuck cos of the following issue. Please find it here and kindly help me. Task is following: I have set of files with such pattern 1t-rw-rw-r-- 1 emily emily 119 Jun 11 10:45 vgtree_5_1_pfs.root 3t-rw-rw-r-- 1 emily emily 145 Jun 11 10:46 vgtree_5_3_pfs.root... (4 Replies)
Discussion started by: emily
4 Replies

9. UNIX for Dummies Questions & Answers

File handling issue

Hi All, I am running into an issue. I have a very big file. Wants to split it in smaller chunks. This file has multiple header/ trailers. Also, between each header/trailer there are records. Number of records in each header trailer combination can vary. Also, headers can start with... (3 Replies)
Discussion started by: Gurkamal83
3 Replies

10. Shell Programming and Scripting

Issue handling single quoted argument in shell script.

Below is my script that works fine and prints the desired output: #!/bin/ksh echo "$1" | while IFS= read -r dirpath do echo "DIRR_PATH:$dirpath" install_dir=$install_dir" "$dirpath done echo "Desired Output:$install_dir" Output: ./loopissue.sh... (10 Replies)
Discussion started by: mohtashims
10 Replies
mdbGeneral(5)							 The m17n Library						     mdbGeneral(5)

NAME
mdbGeneral - General Format DESCRIPTION
The mdatabase_load() function returns the data specified by tags in the form of plist if the first tag is not Mchartable nor Mcharset. The keys of the returned plist are limited to Minteger, Msymbol, Mtext, and Mplist. The type of the value is unambiguously determined by the corresponding key. If the key is Minteger, the value is an integer. If the key is Msymbol, the value is a symbol. And so on. A number of expressions are possible to represent a plist. For instance, we can use the form (K1:V1, K2:V2, ..., Kn:Vn) to represent a plist whose first property key and value are K1 and V1, second key and value are K2 and V2, and so on. However, we can use a simpler expression here because the types of plists used in the m17n database are fairly restricted. Hereafter, we use an expression, which is similar to S-expression, to represent a plist. (Actually, the default database loader of the m17n library is designed to read data files written in this expression.) The expression consists of one or more elements. Each element represents a property, i.e. a single element of a plist. Elements are separated by one or more whitespaces, i.e. a space (code 32), a tab (code 9), or a newline (code 10). Comments begin with a semicolon (;) and extend to the end of the line. The key and the value of each property are determined based on the type of the element as explained below. o INTEGER An element that matches the regular expression -?[0-9]+ or 0[xX][0-9A-Fa-f]+ represents a property whose key is Minteger. An element matching the former expression is interpreted as an integer in decimal notation, and one matching the latter is interpreted as an integer in hexadecimal notation. The value of the property is the result of interpretation. For instance, the element 0xA0 represents a property whose value is 160 in decimal. o SYMBOL An element that matches the regular expression [^-0-9(]([^()]|.)+ represents a property whose key is Msymbol. In the element, , , , and e are replaced with tab (code 9), newline (code 10), carriage return (code 13), and escape (code 27) respectively. Other characters following a backslash is interpreted as it is. The value of the property is the symbol having the resulting string as its name. For instance, the element abc def represents a property whose value is the symbol having the name 'abc def'. o MTEXT An element that matches the regular expression '([^']|')*' represents a property whose key is Mtext. The backslash escape explained above also applies here. r, each part in the element matching the regular expression [xX][0-9A-Fa-f][0-9A-Fa-f] is replaced with its hexadecimal interpretation. After having resolved the backslash escapes, the byte sequence between the double quotes is interpreted as a UTF-8 sequence and decoded into an M-text. This M-text is the value of the property. o PLIST Zero or more elements surrounded by a pair of parentheses represent a property whose key is Mplist. Whitespaces before and after a parenthesis can be omitted. The value of the property is a plist, which is the result of recursive interpretation of the elements between the parentheses. SYNTAX NOTATION
In an explanation of a plist format of data, a BNF-like notation is used. In the notation, non-terminals are represented by a string of uppercase letters (including '-' in the middle), terminals are represented by a string surrounded by '"'. Special non-terminals INTEGER, SYMBOL, MTEXT and PLIST represents property integer, symbol, M-text, or plist respectively. EXAMPLE
Here is an example of database data that is read into a plist of this simple format: DATA-FORMAT ::= [ INTEGER | SYMBOL | MTEXT | FUNC ] * FUNC ::= '(' FUNC-NAME FUNC-ARG * ')' FUNC-NAME ::= SYMBOL FUNC-ARG ::= INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')' For instance, a data file that contains this text matches the above syntax: abc 123 (pqr 0xff) "m and is read into this plist: 1st element: key: Msymbol, value: abc 2nd element: key: Minteger, value: 123 3rd element: key: Mplist, value: a plist of these elements: 1st element: key Msymbol, value: pgr 2nd element: key Minteger, value: 255 4th element: key: Mtext, value: m"text 5th element: key: Mplist, value: a plist of these elements: 1st element: key: Msymbol, value: __ 2nd element: key: Mplist, value: a plist of these elements: 1st element: key: Mtext, value: string 2nd element: key: Msymbol, value: xyz 3rd element: key: Minteger, value: -456 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 mdbGeneral(5)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy