Compare two txt files,mismatches will be in new txt files
Hi,
Below are the sample data for txt files.
txt file 1
txtfile 2
For each partnumber present in txt file 2,we need to compare catgroup_ids for both the files corresponding to the partnumber,mismatches catgroupids and partnumber from txt file 2 will have to store in new txt file
*One part number might have multiple catgroupids.
Thanks for the help in advance.
Regards
Ankita
Last edited by bartus11; 12-26-2013 at 11:32 AM..
Reason: Please use code tags
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Dear experts,
In a directory i have both *.TXT and *.txt files. I have a script-
for file in `ls *.txt`; do
mv $file /tmp/$file
How to list both *.txt and*.TXT file in one command so that script will move both .txt or .TXT whatever it find.
br//purple (4 Replies)
Hi Guys,
I am a newbie to Unix . I am going through Unix Commands. I have a issue . Please try to find a solution for this...
Example: I am in my current directory now which contains a folder name 'Test' . The folder Test contains some files with .txt extension.Inside the Test... (5 Replies)
Hi, I want to compare two txt files and output the matches to a file. For example I have
FILE1 - accounts1.txt
Peter
norman
elektra
table
CHAIR
Newman
nOvice
FILE2 - accounts2.txt
noland
trainfil
peter
Newman
norman
neverlan
CHAIR
jackson
KelSo (4 Replies)
HI All,
I am coding a shell script which will pick all the .csv files in a particular directoryand write it in to a .txt file, this .txt file i will use as a source in datastage for processing.
now after the processing is done I have to move and archive all the files in the .txt file to a... (5 Replies)
Hi
I greatly appreciate the forum and the people here very helpful :)
I could able to tar all the directories, sub dirs and the files. But unable to tar all the directories excluding the log and text files. Can anyone please advise the exact command to use for excluding .log and .txt?
PS:... (4 Replies)
i am working on a shell script and need help in the comparing part of it. for e.g. there two text files like this:
file1.txt
Code:
name1
name2
name3
file1 has to be comared with file2
defaultfile.txt
Code:
name1
name2 (16 Replies)
Hello, i am new in Bash. Actually i have a directory : /home/resultfiles and inside i have these txt files:
531_1.out.res, 531_2.out.res , 531_3.out.res
532_1.out.res, 532_2.out.res , 532_3.out.res
533_1.out.res, 533_2.out.res, 533_3.out.res
All these txt files has this format :
num_q all... (3 Replies)
Discussion started by: nimpoura
3 Replies
LEARN ABOUT REDHAT
unix2dos
unix2dos(1) General Commands Manual unix2dos(1)NAME
unix2dos - UNIX to DOS text file format converter
SYNOPSYS
unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates unix2dos under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
unix2dos
Convert and replace a.txt. Convert and replace b.txt.
unix2dos a.txt b.txt
unix2dos -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode.
unix2dos a.txt -c iso b.txt
unix2dos -c ascii a.txt -c iso b.txt
Convert and replace a.txt while keeping original date stamp.
unix2dos -k a.txt
unix2dos -k -o a.txt
Convert a.txt and write to e.txt.
unix2dos -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
unix2dos -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
unix2dos a.txt -n b.txt e.txt
unix2dos -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHOR
Benjamin Lin - ( blin@socs.uts.edu.au )
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO dos2unix(1)1995.03.31 unix2dos v2.2 unix2dos(1)