Sponsored Content
Full Discussion: awk input large file
Top Forums Shell Programming and Scripting awk input large file Post 302810109 by Akshay Hegde on Tuesday 21st of May 2013 06:58:26 AM
Old 05-21-2013
Ok I will try, but I guess I will get error msg, do you think array can hold 25GB data ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading large file, awk and cut

Hello all, I have 2 files, the first (indexFile1) contains start offset and length for each record inside the second file. The second file can be very large, each actual record start offset and length is defined by the entry in indexFile1. Since there are no records separators wc-l returns 0 for... (1 Reply)
Discussion started by: gio001
1 Replies

2. Shell Programming and Scripting

Updating a line in a large csv file, with sed/awk?

I have an extremely large csv file that I need to search the second field, and upon matches update the last field... I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Discussion started by: trey85stang
5 Replies

3. Shell Programming and Scripting

Using AWK to separate data from a large XML file into multiple files

I have a 500 MB XML file from a FileMaker database export, it's formatted horribly (no line breaks at all). The node structure is basically <FMPXMLRESULT> <METADATA> <FIELD att="............." id="..."/> </METADATA> <RESULTSET FOUND="1763457"> <ROW att="....." etc="...."> ... (16 Replies)
Discussion started by: JRy
16 Replies

4. Shell Programming and Scripting

awk - splitting 1 large file into multiple based on same key records

Hello gurus, I am new to "awk" and trying to break a large file having 4 million records into several output files each having half million but at the same time I want to keep the similar key records in the same output file, not to exist accross the files. e.g. my data is like: Row_Num,... (6 Replies)
Discussion started by: kam66
6 Replies

5. Shell Programming and Scripting

Need to delete large set of files (i.e) close to 100K from a directory based on the input file

Hi all, I need a script to delete a large set of files from a directory under / based on an input file and want to redirect errors into separate file. I have already prepared a list of files in the input file. Kndly help me. Thanks, Prash (36 Replies)
Discussion started by: prash358
36 Replies

6. Shell Programming and Scripting

sed and awk not working on a large record file

Hi All, I have a very large single record file. abc;date||bcd;efg|......... pqr;stu||record_count;date when i do wc -l on this file it gives me "0" records, coz of missing line feed. my problem is there is an extra pipe that is coming at the end of this record like... (6 Replies)
Discussion started by: Gurkamal83
6 Replies

7. UNIX for Beginners Questions & Answers

sed awk: split a large file to unique file names

Dear Users, Appreciate your help if you could help me with splitting a large file > 1 million lines with sed or awk. below is the text in the file input file.txt scaffold1 928 929 C/T + scaffold1 942 943 G/C + scaffold1 959 960 C/T +... (6 Replies)
Discussion started by: kapr0001
6 Replies

8. Shell Programming and Scripting

Use while loop to read file and use ${file} for both filename input into awk and as string to print

I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix. I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice. Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

9. Shell Programming and Scripting

Can't input large file to variable

I have a file that I'm trying to place into a variable. I've tried the following: DATE=`date +%Y%m%d` filez=$(cat /tmp/Test_$DATE.txt)DATE=`date +%Y%m%d` filez=$(</tmp/Test_$DATE.txt)DATE=`date +%Y%m%d` filez=$(`cat /tmp/Test_$DATE.txt`)None of these lines allows the file to go into the... (3 Replies)
Discussion started by: newbie2010
3 Replies

10. UNIX for Advanced & Expert Users

Need optimized awk/perl/shell to give the statistics for the Large delimited file

I have a file size is around 24 G with 14 columns, delimiter with "|" My requirement- can anyone provide me the fastest and best to get the below results Number of records of the file First column and second Column- Unique counts Thanks for your time Karti ------ Post updated at... (3 Replies)
Discussion started by: kartikirans
3 Replies
Tcl_GetIndexFromObj(3tcl)				      Tcl Library Procedures					 Tcl_GetIndexFromObj(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct - lookup string in table of keywords SYNOPSIS
#include <tcl.h> int Tcl_GetIndexFromObj(interp, objPtr, tablePtr, msg, flags, indexPtr) int Tcl_GetIndexFromObjStruct(interp, objPtr, structTablePtr, offset, msg, flags, indexPtr) ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting; if NULL, then no message is provided on errors. Tcl_Obj *objPtr (in/out) The string value of this object is used to search through tablePtr. The internal representation is modified to hold the index of the matching table entry. const char **tablePtr (in) An array of null-terminated strings. The end of the array is marked by a NULL string pointer. const void *structTablePtr (in) An array of arbitrary type, typically some struct type. The first member of the structure must be a null-terminated string. The size of the structure is given by offset. int offset (in) The offset to add to structTablePtr to get to the next entry. The end of the array is marked by a NULL string pointer. const char *msg (in) Null-terminated string describing what is being looked up, such as option. This string is included in error messages. int flags (in) OR-ed combination of bits providing additional information for operation. The only bit that is currently defined is TCL_EXACT. int *indexPtr (out) The index of the string in tablePtr that matches the value of objPtr is returned here. _________________________________________________________________ DESCRIPTION
This procedure provides an efficient way for looking up keywords, switch names, option names, and similar things where the value of an object must be one of a predefined set of values. ObjPtr is compared against each of the strings in tablePtr to find a match. A match occurs if objPtr's string value is identical to one of the strings in tablePtr, or if it is a non-empty unique abbreviation for exactly one of the strings in tablePtr and the TCL_EXACT flag was not specified; in either case the index of the matching entry is stored at *indexPtr and TCL_OK is returned. If there is no matching entry, TCL_ERROR is returned and an error message is left in interp's result if interp is not NULL. Msg is included in the error message to indicate what was being looked up. For example, if msg is option the error message will have a form like "bad option "firt": must be first, second, or third". If Tcl_GetIndexFromObj completes successfully it modifies the internal representation of objPtr to hold the address of the table and the index of the matching entry. If Tcl_GetIndexFromObj is invoked again with the same objPtr and tablePtr arguments (e.g. during a reinvoca- tion of a Tcl command), it returns the matching index immediately without having to redo the lookup operation. Note: Tcl_GetIndexFromObj assumes that the entries in tablePtr are static: they must not change between invocations. If the value of objPtr is the empty string, Tcl_GetIndexFromObj will treat it as a non-matching value and return TCL_ERROR. Tcl_GetIndexFromObjStruct works just like Tcl_GetIndexFromObj, except that instead of treating tablePtr as an array of string pointers, it treats it as a pointer to the first string in a series of strings that have offset bytes between them (i.e. that there is a pointer to the first array of characters at tablePtr, a pointer to the second array of characters at tablePtr+offset bytes, etc.) This is particularly useful when processing things like Tk_ConfigurationSpec, whose string keys are in the same place in each of several array elements. SEE ALSO
Tcl_WrongNumArgs KEYWORDS
index, object, table lookup Tcl 8.1 Tcl_GetIndexFromObj(3tcl)
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy