Sponsored Content
Full Discussion: replace space with new line
Top Forums Shell Programming and Scripting replace space with new line Post 302201948 by dakid on Tuesday 3rd of June 2008 01:06:31 PM
Old 06-03-2008
replace space with new line

i have a file named as templist which looks like this:

Quote:
00121575.000000 02361356.000000 99319704.000000 00497959.000000
i want to translate spaces to a new line so that the file would look like this

Quote:
00121575.000000
02361356.000000
99319704.000000
00497959.000000
im using sed with this sed -e 's/" "/\n/' templist > templist.out but it doesn't work. can someone please help me.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace space, that is not in html tags <> with new line using sed

Hi, I am working on transforming html code text into the .vert text format. I want to use linux utility sed. I have this regexp which should do the work: s/ \(?!*>\)/\n/g. I use it like this with sed: echo "you <we try> there" | sed 's/ \(?!*>\)/\n/g' ... The demanded output should be: you <we... (5 Replies)
Discussion started by: matt1311
5 Replies

2. Shell Programming and Scripting

replace space or spaces in a line of a file with a single :

I am searching while I await a response to this so if it has been asked already I apologize. I have a file with lines in it that look like: bob johnson email@email.org I need it to look like: bob:johnson:email@email.org I am trying to use sed like this: sed -e 's/ /:/g' file >... (5 Replies)
Discussion started by: NewSolarisAdmin
5 Replies

3. Shell Programming and Scripting

gnu sed replace space with new line

please help in making sed singleline command i need to insert dos new line (CR LF) before " 34 matching device(s) found on \\cpu1." " 6 matching device(s) found on \\cpu7." " 102 matching device(s) found on \\mainserver." the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Discussion started by: xserg
1 Replies

4. Shell Programming and Scripting

how to replace new line ( \n ) with space or Tab in Sed

Hi, how to replace new line with tab in sed ... i used sed -e 's/\n/\t/g' <filename > but its not working (1 Reply)
Discussion started by: mail2sant
1 Replies

5. Shell Programming and Scripting

Replace long space to become one space?

Hi, i have the log attached. Actually i want the long space just become 1 space left like this : Rgds, (12 Replies)
Discussion started by: justbow
12 Replies

6. Shell Programming and Scripting

Stripping out more than a space from a line, but keep single space.

Hi all, Is there a way to perform the above, I am trying to strip out more than one space from a line, but keep the single space. See below output example. My Name is test test2 test3 test4 test5 My Name is test test2 test3 test4 test5 Please note that the lines would contain... (7 Replies)
Discussion started by: eo29
7 Replies

7. Shell Programming and Scripting

sed : replace space and end-of-line

Hi ! I'm rather new with sed ... learned a lot already by googling etc ... The following script should replace all spaces and ends-of-lines with "something (see below). #!/bin/bash i=0 while read line do fam="H`printf "%06d" $i`" echo $line | sed -e 's//\t'$fam'\n/g' i=$(($i+1))... (7 Replies)
Discussion started by: jossojjos
7 Replies

8. Shell Programming and Scripting

Replace end of line with a space

for eg: i have i/p file as: ================ i wnt to change end of line ================= my require ouput is like: i wnt to change end of line ==================== (7 Replies)
Discussion started by: RahulJoshi
7 Replies

9. Shell Programming and Scripting

In vi editor I want to replace next line char by space

in vi editor I want to replace next line char by space help me eg: input: 123 123 123 output: 123 123 123 (5 Replies)
Discussion started by: RahulJoshi
5 Replies

10. Shell Programming and Scripting

SED - insert space at the beginning of line and multi replace command

hi I am trying to use SED to replace the line matching a pattern using the command sed 'pattern c\ new line ' <file1 >file 2 I got two questions 1. how do I insert a blank space at the beginning of new line? 2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
RSS Other Screensaver(1)				      General Commands Manual					  RSS Other Screensaver(1)

NAME
sundancer2 - rotating stack of quads. SYNOPSIS
sundancer2 [--root/-r] [--maxfps/-x number] [--vsync/-y number] [--dpms/-M number] [--quad_count/-q number] [--speed/-s number] [--trans- parency/-t number] [--foreground/-f number] [--background/-b number] [--reverse/-e] [--no-reverse/-E] DESCRIPTION
Neat rotation effects from rotation and skewing stack of transparent squares. Ported to Linux by Tugrul Galatali. OPTIONS
--root Draw on the root window. --maxfps number Set maximum frame rate. --vsync number Limit redraws to specified number of vertical refreshes. 0 - 100. Default: 1 --dpms number Stop rendering new frames if the display is not on. 0 - 1. Default: 1 --quad_count number Set number of stacked quads. 1 - 300. Default: 150 --speed number Rotational speed. 1 - 40. Default: 20 --transparency number Percentage of transparency. 1 - 100. Default: 75 --foreground number Color for the top of the heap using hex color codes. 000000 - ffffff. Default: ffff00 --background number Color for the bottom of the heap using hex color codes. 000000 - ffffff. Default: ff0000 --reverse Reverse rotation occasionally. Default: False ENVIRONMENT
DISPLAY to get the default host and display number. SEE ALSO
X(1), COPYRIGHT
Copyright (C) 2002 by Dirk Songuer and Tugrul Galatali. Sundancer2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as pub- lished by the Free Software Foundation. Sundancer2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL- ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. AUTHOR
Dirk Songuer <delax@sundancerinc.de> and Tugrul Galatali <tugrul@galatali.com> X Version 11 RSS Other Screensaver(1)
All times are GMT -4. The time now is 08:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy