03-08-2009
Quote:
Originally Posted by
mjd_tech
Hopefully, this is a correct explanation.
That's exactly it.
Quote:
Originally Posted by
mjd_tech
I was initially confused by the _[NL] thing, thinking this was some kind of special awk reserved variable or something, but then I realized it's just an array named _
_ has no special meaning. It's just a fast and, I confess, obfuscated way of writing array names.
Quote:
Originally Posted by
mjd_tech
I guess that if file1 were super huge, you could run out of memory because it gets loaded into an array. There's probably a way to do this in perl that can handle huge files without slurping into an array...
Well, maybe. However, awk never hit the memory barrier on my systems even on large test files (1 Mega lines and more). But you are probably right. You could do that by parallel looping through two file handles in perl.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have done a coding in shell scripting which reads a file line by line and does something....it takes more than 30 seconds to execute for a single file. when i do the same with perl scripting it takes less than a second.
is that shell scripting is not efficient while working with large number of... (1 Reply)
Discussion started by: brkavi_in
1 Replies
2. Shell Programming and Scripting
hello
have a file1
H87I
Y788O
T347U
J23U
and
file2 J23U U887Y I99U T556U
file3 I99O J99T F557J
file4 N99I T666U R55Y
file5 H87I T347U
file6 H77U R556Y E44T
file7 Y788O K98U H8I
May be using script we can use file1 to search for all the files
and have the output
H87I file5... (3 Replies)
Discussion started by: cdfd123
3 Replies
3. Shell Programming and Scripting
Dear All
I am trying to write one shell which will be running through Cron which contain one SQL query. But I want to draw/fetch the Username password and Instance name (required to loging to the database) from one single file to run that SQL query . Also this file contain details of multiple... (2 Replies)
Discussion started by: jhon
2 Replies
4. Shell Programming and Scripting
Hi,
Need help in writing a script to read the contents of this file test
Test
00a
00b
00c
00d
00e
00f
where it need to read each line to give a display such as
form meta from dev 00a , config=Striped; add dev 00b:00f to meta 00a
Can any one help me in writing this script (2 Replies)
Discussion started by: praveen1516
2 Replies
5. Shell Programming and Scripting
Hi,
I have a file with few values in it. I need script help to read file line by line and check:
1/if it's a file (with extension eg .java .css .jar etc )
or
2/if it's a file without extension and treat it as a directory and then check if the directory exists in working copy else create one... (6 Replies)
Discussion started by: iaav
6 Replies
6. Shell Programming and Scripting
Hello.
I want to to backup some "default:" values from a file do some other job and after restore that "default:" values back.
The problem is that the source and destination file has a lot of default: strings in it but with different values...
So..
Here is an example:
A part of my source... (6 Replies)
Discussion started by: ausdim
6 Replies
7. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies
8. UNIX for Beginners Questions & Answers
Like to have shell script to Read the given file contents into a merged one file with header of path+file name followed by file contents into a single output file.
While reading and merging the file contents into a single file, Like to keep the format of the source file.
... (4 Replies)
Discussion started by: Siva SQL
4 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I have many files but with only 2 names , I want to load the data of that file into database through sqlldr with single control file. how can i do that ?????
Example:
switch_file
switch_file
billing_file
billing_file
now these files should be loaded into same database but different... (1 Reply)
Discussion started by: niti_sharma
1 Replies
SHCOMP(1) Korn shell utilities SHCOMP(1)
NAME
shcomp - compile a shell script
SYNOPSIS
shcomp [ options ] [infile [outfile]]
DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh can read and execute with
the same effect as the original script.
Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly.
If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to
locale specific versions for internationalization.
If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from
standard input.
OPTIONS
[D dictionary] Generate a list of strings that need to be placed in a message catalog for internationalization. [n noexec] Displays warn-
ing messages for obsolete or non-conforming constructs. [v verbose] Displays input from infile onto standard error as it reads it.
EXIT STATUS
0
Successful completion.
>0
An error occurred.
SEE ALSO
ksh(1)
IMPLEMENTATION
version
shcomp (AT&T Research) 2003-03-02
author
David Korn <dgk@research.att.com>
copyright
Copyright (c) 1982-2010 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt
2003-03-02 SHCOMP(1)