08-17-2008
The newline characters are different between Unix and Windows. So if you write a script in Windows, it may not work in Unix.
dos2unix is one utility that you can use to clean up your windows text files for use in Unix.
5 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I'm new to UNIX and new to this forum, so forgive my lack of knowledge. I'm new with editing in vi so I FTP scripts to a Windows machine and edit the script in notepad (when I need to do something quickly). Sometimes when I FTP the script back to the UNIX box, strange characters... (4 Replies)
Discussion started by: dgower2
4 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I want to show my output for the script to notepad.Anybody know what is the command to do this...
Thanks.. (7 Replies)
Discussion started by: mastercar
7 Replies
3. Solaris
i have a file which i open in wordpad shows proper formated o/p column wise .. but same file which is txt file when i do cat in solaris shows grabbled o/p is there any way i can see the output same as wordpad or txt pad ? even in solaris ?
Following is the o/o when i do a #cat file.txt | more... (8 Replies)
Discussion started by: fugitive
8 Replies
4. UNIX for Dummies Questions & Answers
Hi,
just quick question, I currently type up my scripts in Notepad++ and then copy them into my file (in VI).
However, i've noticed that all the lines get messed up and it becomes difficult to read the script.
so i've to spend time then using '\' at the end of lines etc and re-formatting... (7 Replies)
Discussion started by: horhif
7 Replies
5. Windows & DOS: Issues & Discussions
I connect to my office server using ftp option in notepad++
I am not able to open directory's with out setting my clear case view in the notepad++
Hence pls help me in setting the view in notepad++ so that it can read all the files and directorys (6 Replies)
Discussion started by: Syed Imran
6 Replies
diff3(1) General Commands Manual diff3(1)
Name
diff3 - 3-way differential file comparison
Syntax
diff3 [-ex3] file1 file2 file3
Description
The command compares three versions of a file, and publishes the ranges of text that disagree, flagged with the following codes:
==== all three files differ
====1 file1 is different
====2 file2 is different
====3 file3 is different
The type of change needed to convert a given range of a given file to some other is indicated in one of these ways:
f : n1 a Text is to be appended after line number n1 in file f, where f = 1, 2, or 3.
f : n1 , n2 c
Text is to be changed in the range line n1 to line n2. If n1 = n2, the range may be abbreviated to n1.
The original contents of the range follows immediately after a c indication. When the contents of two files are identical, the contents of
the lower-numbered file is suppressed.
Options
-3 Produces an editor script containing the changes between file1 and file2 that are to be incorporated into file3.
-e Produces an editor script containing the changes between file2 and file3 that are to be incorporated into file1.
-x Produces an editor script containing the changes among all three files.
Examples
Under the -e option, publishes a script for the editor that incorporates into file1 all changes between file2 and file3 - that is, the
changes that would normally be flagged ==== and ====3. Option -x (-3) produces a script to incorporate only changes flagged ==== (====3).
The following command applies the resulting script to `file1':
(cat script; echo '1,$p') | ed - file1
Restrictions
Text lines that consist of a single `.' defeat -e.
Files
/tmp/d3?????
/usr/lib/diff3
See Also
cmp(1), comm(1), diff(1), dffmk(1), join(1), sccsdiff(1), uniq(1)
diff3(1)