Addign spaces between text


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Addign spaces between text
# 1  
Old 11-08-2001
Addign spaces between text

hi people,

Im having trouble inserting text spaces on a script, i know i need to use the 'sed -e' command but am not sure what command.

Can anyone helpSmilie
# 2  
Old 11-08-2001
Here are some URL's to get you going (there are lots more)
Check out the FAQ's on this forum as well...

http://www.pegasus.rutgers.edu/~elflord/unix/sed.html
http://etext.lib.virginia.edu/helpsheets/regex.html
http://www.ntua.gr/cgi-bin/man-cgi?sed+1


...try a few things and let us know how it goes. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk - print columns with text and spaces

Hi, I'm using awk to print columns from a tab delimited text file: awk '{print " "$2" "$3" $6"}' file The problem I have is column 6 contains text with spaces etc which means awk only prints the first word. How can I tell awk to print the whole column content as column 6? Thanks, (10 Replies)
Discussion started by: keenboy100
10 Replies

2. UNIX for Advanced & Expert Users

ls -ltr a list of filenames-with-spaces within a text file

OS: RHEL 5.8 shell: bash 3.2.25 Directory /home/guest/ contains these files: file a file b file c fileD fileE fileF testFile.txt I'm trying to find the syntax to run ls -ltr against this list of files that is contained within a text file, testFile.txt. The file testFile.txt has... (4 Replies)
Discussion started by: uschaafm
4 Replies

3. UNIX for Dummies Questions & Answers

Removing blank spaces from text files in UNIX

Hello, I am an super newbie, so forgive my sheer ignorance. I have a series of text files formatted as follows (just showing the header and first few lines): mean_geo mean_raw lat lon 0.000 0 -70.616 163.021 0.000 0 -70.620 163.073 0.000 ... (8 Replies)
Discussion started by: vtoniolo
8 Replies

4. UNIX Desktop Questions & Answers

How to print several pages only text without spaces among

1 I open pdf file - it has empty borders of space without text 2 I want to print 9 pages to save paper & eyes 3 In Okular i choose print - 9 pages. And I have no option for adjusting text to text (to print without spaces among 9 pages). What program can you recommend to me for this... (1 Reply)
Discussion started by: Xcislav
1 Replies

5. Shell Programming and Scripting

Replace blank spaces with semicolon - text file

Hi all, Been trying to find a solution to this, I'm sure its a sed 1 liner, but I don't know sed well enough to work it out... I have a text file in the following format: 431 666 1332 2665 0.24395 432 670 ... (3 Replies)
Discussion started by: mpcengineering
3 Replies

6. Shell Programming and Scripting

csh script for deleting extra spaces in text file

I am new to scripting and I needed to know if there would be an easy way to delete extra spaces in a text file. I have a file with three rows with 22 numbers each, but there is extra spaces between the numbers when it gets output by this program AFNI that I am using. What script would help delete... (2 Replies)
Discussion started by: hertingm
2 Replies

7. Shell Programming and Scripting

Remove blank spaces in a text file...

Hi, I have this problem that there are blank spaces in my text file... i want to remove them line 1 line 2 line 3 I want to remove the space between line 2 and line 3... I tried sed... it work but it prints the whole text file at the command prompt which i dont want.... sde i tried was... (4 Replies)
Discussion started by: bhagya2340
4 Replies

8. Shell Programming and Scripting

Read variables contain spaces from text file

Dears, I developed a shell script to read varibales from text file as the following: cat /dev/null > /rename-OUT.txt while read line do set -- `echo $line` snmpset -c dslmibs $1 sysName.0 octetstring $2 after=$(snmpget -c dslmibs $1 sysName.0 | cut -d: -f3) echo "$1,$2,$after" >>... (1 Reply)
Discussion started by: ahmed.zaher
1 Replies

9. Shell Programming and Scripting

Adding specific text and spaces to each line in a text file

Hi, I wanted to add specific text to each row in a text file containing three rows. Example: 0 8 7 6 5 5 7 8 9 0 7 9 7 8 9 0 1 2 And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this: 21 0 8 7 6 5 5 7 8... (4 Replies)
Discussion started by: hertingm
4 Replies

10. UNIX for Advanced & Expert Users

Please Help!! Reading a string of text with concurrent spaces into a shell variable

Please Help!! Here is a very simplistic example of what I am trying to accomplish. I need what I have inbetween the quotes to be read into the shell variable. x="This is fun" echo $x The results of x from the above expression is: This is fun Notice the unix takes out the... (1 Reply)
Discussion started by: mjs3221
1 Replies
Login or Register to Ask a Question