01-22-2014
Are the input files sorted somehow?
E.g. is column3 sorted in ascending order?
Or does the overlap happen with neighbor lines only i.e. never happens with distant lines? (Then the resulting algorithm can become a merge.)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello I am facing a scenario where I have a file with XML content and I am running shell script over it. But the problem is the XML is getting updated with new services. In the below scenario, my script takes values from the xml file from one service name say ABCD. Since there are multiple, it is... (8 Replies)
Discussion started by: chiru_h
8 Replies
2. Shell Programming and Scripting
Hello UNIX experts,
I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines.
e.g. The input Files are one.txt, two.txt, three.txt, four.txt
The cat of four... (1 Reply)
Discussion started by: yogeshkumkar
1 Replies
3. Shell Programming and Scripting
I have a large 3479 line .csv file, the content of which looks likes this:
1;0;177;170;Guadeloupe;x
2;127;171;179;Antigua and Barbuda;x
3;170;144;2;Umpqua;x
4;170;126;162;Coos Bay;x
...
1205;46;2;244;Unmak Island;x
1206;47;2;248;Yunaska Island;x
1207;0;2;240;north sea;x... (5 Replies)
Discussion started by: kalelovil
5 Replies
4. Shell Programming and Scripting
I would like to print the output beginning with a header from a seperate file like this:
awk 'BEGIN{FS="_";print ((getline < "header.txt")>0)} { if (! ($0 ~ /EL/ ) print }" input.txtWhat am i doing wrong? (4 Replies)
Discussion started by: sdf
4 Replies
5. UNIX for Dummies Questions & Answers
First time poster, but the forum has saved my bacon more times than... Lots.
Anyway, I have a text file, and wanted to use Awk (or any other sensible program) to print out overlapping sections, or arbitrary length. To describe by example, for file
1
2
3
4
5
etc...
I want the out put... (3 Replies)
Discussion started by: matfald
3 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I wish to merge two files:
file1: with header
rsSNP-ID Chromosome Chr-Pos
rs171 1 175261679
rs242 1 20869461
rs538 1 6160958
file2: without header
disease:AAT deficiency:M0525101 rs1243168 20109307 1
disease:AAT deficiency:M0525101 rs4900229 20109307 1... (3 Replies)
Discussion started by: luoruicd
3 Replies
7. Shell Programming and Scripting
Hi all,
I have two files, chap.txt and complex.txt.
chap.txt looks like this:
a
d
l
m
r
k
complex.txt looks like this:
a c d e l m n j
a d l p q r
c p r m
......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
8. Programming
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
Discussion started by: khaled79
1 Replies
9. Shell Programming and Scripting
file1
chr pos1 pos2 pos3 pos4
1)chr1 1000 2000 3000 4000
2)chr1 1380 1480 6800 7800
3)chr1 6700 7700 1200 2200
4)chr2 8500 9500 5670 6670
file2
chr pos1 pos2 pos3 pos4
1)chr2 8500 9500 5000 6000
2)chr1 6700 7700 1200 2200
3)chr1 1380 1480 6700 7700
4)chr1 1000 2000 4900 5900
I... (2 Replies)
Discussion started by: data_miner
2 Replies
10. Shell Programming and Scripting
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT HPUX
passwd_export
passwd_export(1m) passwd_export(1m)
NAME
passwd_export - Creates local password and group files
SYNOPSIS
passwd_export [-d dir_name] [-m max_entries] [-h[elp]] [-n] [-s] [-v] [-x]
OPTIONS
The name of the directory to store the password, group, and organization files created by passwd_export. If you do not enter a directory
name, the files are stored in the /etc directory. Display help information. Ignore passwd_override and group_override file entries.
Without this option, passwd_export applies the override entries from both files to the local password and group files it creates. The max-
imum number of entries that can be stored in the local files. Sort the local password and group file entries by UNIX number. If you do
not specify this option, the entries are in order as they are retrieved from the registry. Run in verbose mode. Do not create entries for
users with OMIT as their encrypted password in the passwd_override and group_override files. See the passwd_override and group_override
reference pages for further details about omitting users.
DESCRIPTION
The dceshared/bin/passwd_export command creates local password and group files from registry data. These files are used when the network
registry is unavailable and by programs that use the original UNIX passwd and group interfaces instead of the DCE interfaces. Use
passwd_export to keep these local files consistent with the registry database.
When passwd_export runs, it makes backup copies of the current password and group files, if they exist. The files are named, respectively,
passwd.bak and group.bak.
By default, the backups are stored and the new files created in the /etc directory. You can override the default by supplying a directory
name with the -d option.
Running passwd_export
The passwd_export command is commonly run with an entry in /usr/lib/crontab. For example, to update the files every hour, the entry is 0 *
* * * dceshared/bin/passwd_export In large network environments, it is a good idea to stagger the times passwd_export is run.
RELATED INFORMATION
Commands: rgy_edit(1m)
Files: group(5), passwd(5), passwd_override(5), group_override(5)
passwd_export(1m)