Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problems with Dutch and converting files to UNIX Post 302893955 by A-V on Saturday 22nd of March 2014 11:51:33 AM
Old 03-22-2014
Perderabo, it tells me that I have illegal input sequence at position 0
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting files from unix to windows

Need Help?? We receive Files From GM Motors and they written on a Sun Workstation using the Tar Command on a 4mm Dat Tape. We have an HP sure Store 24 Tape drive that will Execpt but when i do that it says that the media is bad. was wondering if there was any software that would read it in its... (2 Replies)
Discussion started by: jefft1976
2 Replies

2. UNIX Desktop Questions & Answers

Converting BMP to BM (or other unix format)

Hey pllz, ive got a little problem, i want to convert a bmp of gif or jpg to an unix format (bm) anybody got any suggestions ? greets\EJ (1 Reply)
Discussion started by: EJ =)
1 Replies

3. OS X (Apple)

Converting Unix executable files

I loaded OS X Panther on my Mac G4 and found that many files previously saved as Word or Word Perfect files were inadventently converted to Unix executable files. When I try to read these in Word, it cannot recognize or translate the file properly. Does anyone know how to translate these files? Is... (4 Replies)
Discussion started by: Steven Greenber
4 Replies

4. UNIX for Dummies Questions & Answers

Converting Unix text to windows

I am trying to FTP a text file from a machine running LynxOS and I am having problems with the way windows "sees" the characters. For example this is how windows presents the text:     DevProcRcpClass The boxes are what I am having problems with. When viewing the same file on a... (3 Replies)
Discussion started by: mchristisen
3 Replies

5. Windows & DOS: Issues & Discussions

Converting UNIX scripts to DOS

Is there a tool available to convert UNIX (BASH Shell) scripts to DOS scripts? I understand that DOS scripting is far inferior to unix scripting, and therfore this conversion may not be possible. Alternativley, perhaps I could convert my Unix scripts to C... then compile it for a windows... (2 Replies)
Discussion started by: Crozz
2 Replies

6. Shell Programming and Scripting

Converting DOS filetype to UNIX

Hello folks I am working on a project that requires me to write a script that operates on a bunch of text files. When I try less file.txt I see a bunch of ^M's everywhere. Some Googling tells me that this is because the files have a DOS fileformat and found the following fixes: sed 's/^M$//'... (5 Replies)
Discussion started by: ksk
5 Replies

7. Shell Programming and Scripting

awk - problems by converting date-format

Hi i try to change the date-format from DD/MM/YYYY into MM/DD/YY. Input-Data: ... 31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222 31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0 01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223 ... Output-Data should be: ...... (7 Replies)
Discussion started by: IMPe
7 Replies

8. Shell Programming and Scripting

Converting Multiline Files to Flat Files?

How to convert this: F1-R1 F1-R2 F1-R3 into a flat file for bash?? Each record F2-R1 F2-R2 F2-R3 F3-R1 F3-R2 F3-R3 F4-R1 F4-R2 F4-R3is on one line with all fields for that record, put into an output file. The output file should look like this when converted: F1-R1,F2-R1,F3-R1,F4-R1... (6 Replies)
Discussion started by: bud1738
6 Replies

9. Homework & Coursework Questions

Converting .dat to UNIX

I uploaded a .dat file from sftp to my server and after using dos2unix to convert the file and check my work it says that the file was not transferred correctly and that the content is garbled. Please help (3 Replies)
Discussion started by: Ovid158
3 Replies
Merge(3pm)						User Contributed Perl Documentation						Merge(3pm)

NAME
Algorithm::Merge - Three-way merge and diff SYNOPSIS
use Algorithm::Merge qw(merge diff3 traverse_sequences3); @merged = merge(@ancestor, @a, @b, { CONFLICT => sub { } }); @merged = merge(@ancestor, @a, @b, { CONFLICT => sub { } }, $key_generation_function); $merged = merge(@ancestor, @a, @b, { CONFLICT => sub { } }); $merged = merge(@ancestor, @a, @b, { CONFLICT => sub { } }, $key_generation_function); @diff = diff3(@ancestor, @a, @b); @diff = diff3(@ancestor, @a, @b, $key_generation_function); $diff = diff3(@ancestor, @a, @b); $diff = diff3(@ancestor, @a, @b, $key_generation_function); @trav = traverse_sequences3(@ancestor, @a, @b, { # callbacks }); @trav = traverse_sequences3(@ancestor, @a, @b, { # callbacks }, $key_generation_function); $trav = traverse_sequences3(@ancestor, @a, @b, { # callbacks }); $trav = traverse_sequences3(@ancestor, @a, @b, { # callbacks }, $key_generation_function); USAGE
This module complements Algorithm::Diff by providing three-way merge and diff functions. In this documentation, the first list to "diff3", "merge", and "traverse_sequences3" is called the `original' list. The second list is the `left' list. The third list is the `right' list. The optional key generation arguments are the same as in Algorithm::Diff. See Algorithm::Diff for more information. diff3 Given references to three lists of items, "diff3" performs a three-way difference. This function returns an array of operations describing how the left and right lists differ from the original list. In scalar context, this function returns a reference to such an array. Perhaps an example would be useful. Given the following three lists, original: a b c e f h i k left: a b d e f g i j k right: a b c d e h i j k merge: a b d e g i j k we have the following result from diff3: [ 'u', 'a', 'a', 'a' ], [ 'u', 'b', 'b', 'b' ], [ 'l', 'c', undef, 'c' ], [ 'o', undef, 'd', 'd' ], [ 'u', 'e', 'e', 'e' ], [ 'r', 'f', 'f', undef ], [ 'o', 'h', 'g', 'h' ], [ 'u', 'i', 'i', 'i' ], [ 'o', undef, 'j', 'j' ], [ 'u', 'k', 'k', 'k' ] The first element in each row is the array with the difference: c - conflict (no two are the same) l - left is different o - original is different r - right is different u - unchanged The next three elements are the lists from the original, left, and right arrays respectively that the row refers to (in the synopsis, these are @ancestor, @a, and @b, respectively). merge Given references to three lists of items, "merge" performs a three-way merge. The "merge" function uses the "diff3" function to do most of the work. The only callback currently used is "CONFLICT" which should be a reference to a subroutine that accepts two array references. The first array reference is to a list of elements from the left list. The second array reference is to a list of elements from the right list. This callback should return a list of elements to place in the merged list in place of the conflict. The default "CONFLICT" callback returns the following: q{<!-- ------ START CONFLICT ------ -->}, (@left), q{<!-- ---------------------------- -->}, (@right), q{<!-- ------ END CONFLICT ------ -->}, traverse_sequences3 This is the workhorse function that goes through the three sequences and calls the callback functions. The following callbacks are supported. NO_CHANGE This is called if all three sequences have the same element at the current position. The arguments are the current positions within each sequence, the first argument being the current position within the first sequence. A_DIFF This is called if the first sequence is different than the other two sequences at the current position. This callback will be called with one, two, or three arguments. If one argument, then only the element at the given position from the first sequence is not in either of the other two sequences. If two arguments, then there is no element in the first sequence that corresponds to the elements at the given positions in the second and third sequences. If three arguments, then the element at the given position in the first sequence is different than the corresponding element in the other two sequences, but the other two sequences have corresponding elements. B_DIFF This is called if the second sequence is different than the other two sequences at the current position. This callback will be called with one, two, or three arguments. If one argument, then only the element at the given position from the second sequence is not in either of the other two sequences. If two arguments, then there is no element in the second sequence that corresponds to the elements at the given positions in the first and third sequences. If three arguments, then the element at the given position in the second sequence is different than the corresponding element in the other two sequences, but the other two sequences have corresponding elements. C_DIFF This is called if the third sequence is different than the other two sequences at the current position. This callback will be called with one, two, or three arguments. If one argument, then only the element at the given position from the third sequence is not in either of the other two sequences. If two arguments, then there is no element in the third sequence that corresponds to the elements at the given positions in the first and second sequences. If three arguments, then the element at the given position in the third sequence is different than the corresponding element in the other two sequences, but the other two sequences have corresponding elements. CONFLICT This is called if all three sequences have different elements at the current position. The three arguments are the current positions within each sequence. BUGS
Most assuredly there are bugs. If a pattern similar to the above example does not work, send it to <jsmith@cpan.org> or report it on <http://rt.cpan.org/>, the CPAN bug tracker. Algorithm::Diff's implementation of "traverse_sequences" may not be symmetric with respect to the input sequences if the second and third sequence are of different lengths. Because of this, "traverse_sequences3" will calculate the diffs of the second and third sequences as passed and swapped. If the differences are not the same, it will issue an `Algorithm::Diff::diff is not symmetric for second and third sequences...' warning. It will try to handle this, but there may be some cases where it can't. SEE ALSO
Algorithm::Diff. AUTHOR
James G. Smith, <jsmith@cpan.org> COPYRIGHT
Copyright (C) 2003, 2007 Texas A&M University. All Rights Reserved. This module is free software; you may redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-10-15 Merge(3pm)
All times are GMT -4. The time now is 01:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy