Sponsored Content
Top Forums Shell Programming and Scripting Replace unix 'new line' with windows 'new line' Post 302464693 by wha72 on Wednesday 20th of October 2010 06:26:42 PM
Old 10-20-2010
Replace unix 'new line' with windows 'new line'

I'm trying to write a script to convert a unix text file to windows/dos format. Essentially all I want to do is replace the Unix return with a windows one.

on the command line I can do this successfully by:

sed s/$/^M/ ~/unix.txt ~/dos.txt

when I put this line in my shell script it literally enters a ^M in the text file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

windows file to unix :end line chararcter

hi , When i ftp a text file from Windows to unix enviornment and open the file in " vi editor" the end line charcrter of the windows file is seen as "cntrl+M" charcter in the Unix enviornment. Is there any command in unix , so that i dont see this "cntrl+M" chararcter in the... (9 Replies)
Discussion started by: dharmesht
9 Replies

2. UNIX for Dummies Questions & Answers

How do you use UNIX commands in the Windows Command Line?

I tried opening the windows command line and typing UNIX commands, but they don't work. It kept saying that it was not recognized as an internal or external command, operable program or batch file. Removed strange sentence with even stranger link I need to use UNIX commands such as 'less',... (9 Replies)
Discussion started by: vlay2
9 Replies

3. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

4. Shell Programming and Scripting

I need to know how to replace a line after a pattern match with an empty line using SED

Hi How Are you? I am doing fine! I need to go now? I will see you tomorrow! Basically I need to replace the entire line containing "doing" with a blank line: I need to the following output: Hi How Are you? I need to go now? I will see you tomorrow! Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies

5. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

6. Windows & DOS: Issues & Discussions

Convert UNIX text file in Windows to recognize line breaks

Hmmm I think I found the correct subforum to ask my question... I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this?... (1 Reply)
Discussion started by: frys_hp
1 Replies

7. UNIX for Dummies Questions & Answers

Convert UNIX text file in Windows to recognize line breaks

Hi all, I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this? Or just reinsert thousands of line breaks again :eek: ? (2 Replies)
Discussion started by: frys_hp
2 Replies

8. Shell Programming and Scripting

Multiple line search, replace second line, using awk or sed

All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed... I have an input file similar to: &LOG &LOG Part: "@DB/TC10000021855/--F" &LOG &LOG &LOG Part: "@DB/TC10000021852/--F" &LOG Cloning_Action: RETAIN &LOG Part: "@DB/TCCP000010713/--A" &LOG &LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies

9. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

10. Shell Programming and Scripting

Replace values in script reading line by line using sed

Hi all, Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE. for pa in PA_VALUE blah blah do for pb in PB_VALUE blah blah do I have a text file with two columns of values for PA and PB. 14.5 16.7 7.8 9.5 5.6 3.6 etc etc I would like to read this... (7 Replies)
Discussion started by: crimsonengineer
7 Replies
Arrange(1x)						   AfterStep X11 window manager 					       Arrange(1x)

NAME
Arrange - AfterStep module for arranging windows in a tiling or cascading order CONFIGURATION OPTIONS
DESCRIPTION
Arrange was developed to replace Tile and Cascade which were present in AfterStep 1.8 and stopped working with the introduction of After- Step 2.0. Like Tile and Cascade Arrange can be used to tile or cascade windows subject to certain constraints. By default Arrange will cascade windows located on the current screen. OPTIONS
-a Causes all window styles to be affected, even ones with the WindowListSkip style. -alldesks Causes windows on all desks to be effected. -desk Causes all windows on the desk to be cascaded instead of the current screen only. -H Causes windows to be tiled horizontaly. This will only have an effect if -tile is passed. -incx arg Specifies a horizontal increment which is successively added to arranged windows. arg is a percentage of screen width, or pixel value if a p is suffixed. Default is 20p. -incy arg Specifies a vertical increment which is successively added to arranged windows. arg is a percentage of screen height, or pixel value if a p is suffixed. Default is 20p. -m Causes maximized windows to also be affected (implied by -all). -mn arg Tiles up to arg windows in tile direction. If more windows exist, a new direction row or column is created (in effect, a matrix is created). -noraise Inhibits window raising, leaving the depth ordering intact. -nostretch Inhibits window expansion when using the -resize option. Win- dows will only shrink to fit the maximal width and height (if given). -pattern arg Only arrange windows matching the supplied pattern. -r Reverses the window sequence. -resize Forces all windows to resize to the constrained width and height (if given). -s Causes sticky windows to also be affected (implied by -all). -t Causes transient windows to also be affected (implied by -all). -tile Causes windows to be tiled not cascaded. -u Causes untitled windows to also be affected (implied by -all). INVOCATION
Arrange can be invoked from the autoexec file or by binding the action "Module Arrange [args]" to a key-stroke in a feel file. CONFIGURATION OPTIONS
Command-line arguments passed to Arrange are described in the OPTIONS section. Up to four numbers can be placed on the command line that are not switches. The first pair specify an x and y offset to start the first window (default is 0, 0). The second pair specify an absolute coordi- nate reference denoting the lower right bounding box for tiling. If any number is suffixed with the letter p, then it is taken to be a pixel value, otherwise it is interpreted as a screen percentage. Speci- fying zero for any parameter is equivalent to not specifying it. This invocation will horizontally tile windows with a bounding box which starts at 10 by 10 percent into and down the screen and ends at 90 by 90 percent into and down the screen. Arrange 10 10 90 90 -tile -H It is probably not a good idea to delete windows while windows are being arranged. 3rd Berkeley Distribution AfterStep v.2.2.11 Arrange(1x)
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy