Create 2 files in unix in 2 different directories, compare them and fetch common words between these 2 files. Print them on the screen and also redirect the output to your home directory in the below format: file 1 | file 2 line no: word 1 | line no: word 1 line no: word 2 | line no: word 2 line no:
problem i am not able to move the file and how to get given syntax asked in the question
Last edited by rbatte1; 08-24-2017 at 06:21 AM..
Reason: Correcting CODE tags
Hi,
iam having the file as follows:
ABCDEFGH|0987654321234567
ABCDEFGH|0987654321234523
ABCDEFGH|0987654321234556
ABCDEFGH|0987654321234545
POIUYTRE|1234567890890678
POIUYTRE|1209867757352567
POIUYTRE|5463879088797131
POIUYTRE|5468980091344456
pls provide me the split command
... (14 Replies)
I want to compare some files.
say iam having 2 sets of files ,each is having some 10 files.
ie,
file1
1a.txt
1b.txt
1c.txt
...
file2
2a.txt
2b.txt
2c.txt
...
i need to read line by line of this files parralley..
ie.. i want to read file1 first line that is 1a.txt and file2... (2 Replies)
Hi,
I am looking for a PDF or an e-book which can show in details how to do Shell Scripting or Programming. Can anybody provide me with a link to such a tutorial? I have downloaded some tutorials but they show only basics and not give any in-depth study material.
I am using Red Hat Linux... (2 Replies)
# set date to your spec: this is month/day/yr/hr/min/sec:
sysdate=`date '+%m/%d/%Y-%H:%M:%S'`
# get the last line before the history file is modified
tail -1 /tmp/hosthistory.txt |while read lastdate mydevices
do
echo $lastdate
echo $mydevices
done
LIST = 'ypcat hosts|| sort... (11 Replies)
I was trying out some new series to get it print
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
and the seond one is
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
but was unable to get the result. (5 Replies)
hi,
i am trying this while loop and i only want that it should only read food as pizza....no other entry should be taken here.
#!/usr/bin/perl -w
$food = " ";
while ( $food ne 'pizza' )
{
print 'enter what you had last night: ';
chomp ($food = <STDIN>);
#print $food ;
}
... (2 Replies)
Hi,
We need to compare a text file File1.txt and config file File2.txt in a way that it checks if the content of File1.txt exists between the range mentioned in File2.cfg.
The range here is the range between col1 and col2 of File2.cfg
If the content of File1.txt lies between the range of... (12 Replies)
dircmp(1) General Commands Manual dircmp(1)NAME
dircmp - directory comparison
SYNOPSIS
n] dir1 dir2
DESCRIPTION
examines dir1 and dir2 and generates various tabulated information about the contents of the directories. Sorted listings of files that
are unique to each directory are generated for all the options. If no option is entered, a sorted list is output indicating whether the
filenames common to both directories have the same contents.
Compare the contents of files with the same name in
both directories and output a list telling what must be changed in the two files to bring them into agreement. The list
format is described in diff(1).
Suppress messages about identical files.
Change the width of the output line to
n characters. The default width is 72.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the order in which the output is sorted.
If is not specified in the environment or is set to the empty string, the value of is used as a default. If is not specified or is set to
the empty string, a default of ``C'' (see lang(5)) is used instead of If any internationalization variable contains an invalid setting,
behaves as if all internationalization variables are set to ``C'' (see environ(5)).
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
Compare the two directories and and produce a list of changes that would make the directories identical:
WARNINGS
This command is likely to be withdrawn from X/Open standards. Applications using this command might not be portable to other vendors' sys-
tems. As an alternative is recommended.
SEE ALSO cmp(1), diff(1).
STANDARDS CONFORMANCE dircmp(1)