I am working on a project that requires me to write a script that operates on a bunch of text files. When I try
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:
or
Alas, neither of these approaches seems to work. When I open the file in gedit, everything is formatted appropriately and if I use gedit to save the file as file1.txt, the new file is fine when I do
too. Is there anything I can do to fix the file from command line?
---------- Post updated at 03:05 AM ---------- Previous update was at 03:00 AM ----------
Sorry folks, I just realized that the files are Mac OS Classic file format and not DOS. I wrote a little awk script that fixes things now. I'm very sorry for the confusion. I'd appreciate it if a moderator can remove the thread.
I know nothing of unix and didn't know where to start. I've heard of a DOS to Unix translator, and since I know DOS pretty well, I thought that this program would be perfect. Any help you could give me would be appreciated.
Bryan (1 Reply)
Hi friends!
I am having some simple shell script files to build postgresql database and all. Now i want to convert those scripts to dos batch scripts(to run on windows XP/2000/NT) because there is no need of unix emulation for latest release of postgresql. Please somebody help me. (1 Reply)
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)
hi eveybody,
i use sco unix as server and dos as client . how i can connect from unix server to dos client ( how to telnet to dos and run commands?)?
thanks. (1 Reply)
hi eveybody,
i use sco unix as server and dos as client . how i can connect from unix server to dos client ( how to telnet to dos and run commands?)?
thanks. (1 Reply)
hi eveybody,
i use sco unix as server and dos as client . how i can connect from unix server to dos client ( how to telnet to dos and run commands?)?
thanks. (8 Replies)
Is any one who know a good tutorial for Unix bash script and Ms-Dos scipt??
if yes, if is possible to upload it or give me the link???
What is the difference betwwen uvix and ms-dos script?? (1 Reply)
Hi,
I am new to shell scripting and exploring it , I have developed few sample shell script but I have developed them on windows xp notepad and then saving them on folder and then testing them on cywgin and running perfectly...but these scripts are in dos format and I want to convert them in unix... (1 Reply)
Hi,
This is my DOS Batch file.
@echo off
echo "Program Name :" %0
rem echo "Next param :" %1
echo "Next param :" "Username/Password"
echo "User Id :" %2
echo "User Name :" %3
echo "Request ID ... (4 Replies)
Discussion started by: Rami Reddy
4 Replies
LEARN ABOUT OPENSOLARIS
gedit
gedit(1) User Commands gedit(1)NAME
gnome-text-editor, gedit - Text Editor for the GNOME desktop.
SYNOPSIS
gnome-text-editor | gedit [--encoding=encoding] [--new-document] [--new-window] [+[num]] [gnome-std-options] [filename]
DESCRIPTION
gedit or gnome-text-editor is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor. It can be used to create and edit all kinds of
text files. Multiple documents can be edited at the same time. Each document resides in a specific tabbed section of the application win-
dow.
gedit features a flexible plugin system which can be used to dynamically add new advanced features to gedit itself.
OPTIONS
The following options are supported:
--encoding=encoding Set the character encoding to be used to open the files listed on the command line.
--new-document Create a new top-level document or tabbed section in an existing instance of gedit.
--new-window Create a new top-level window in an existing instance of gedit.
+[num] For the first file, go to the line specified by num (do not insert a space between the "+" sign and the number). If
num is missing, go to the last line.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information.
OPERANDS
The following operands are supported:
filename The name of the image file to edit.
EXTENDED DESCRIPTION
The gedit application accepts pipes, so you can specify a pipe after another command, to load the output of the command into gedit. For
example:
example% ls -l | gedit
EXAMPLES
Example 1: To Edit an ASCII File Named document.txt
example% gedit document.txt
Example 2: To Add a New Tab That Contains an ASCII File Named book.txt
example% gedit --new-document book.txt
Example 3: To Add a New Top-Level Window That Contains an ASCII File Named testfile.txt
example% gedit --new-window testfile.txt
EXIT STATUS
The following exit values are returned:
0 Application exited successfully.
>0 An error occurred.
FILES
The following files are used by this application:
/usr/bin/gedit The executable file for the gnome-text-editor application.
/usr/bin/gnome-text-editor A symbolic link to the gedit executable file.
/usr/lib/gedit/plugins Location of gedit plugins.
/usr/share/gtk-doc/html/gedit Location of developer documentation for writing a gedit plugin.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-text-editor |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO libgtksourceview-1.0(3), attributes(5), gnome-std-options(5)
Online Help gedit manual.
NOTES
This man page was written by the following people: Paolo Maggi, Paolo Borelli, Chema Celorio, James Willcox, Federico Mena Quintero.
Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2004, 2006.
SunOS 5.11 31 Aug 2004 gedit(1)