Awk/sed - add space between dot and letter


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Awk/sed - add space between dot and letter
# 8  
Old 01-24-2013
Old Unix sed wants the :label on one line, either
Code:
sed '
:label
other stuff
'

or
Code:
sed -e :label -e 'other stuff'

GNU sed has it fixed.
This User Gave Thanks to MadeInGermany For This Post:
# 9  
Old 01-24-2013
Oooh, got you! Thanks!
# 10  
Old 01-24-2013
Code:
perl -pe 's/[A-Z]\.(?=[A-Z])/$& /g'


Last edited by Scrutinizer; 01-24-2013 at 08:42 AM..
This User Gave Thanks to Scrutinizer For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Replace space in column with letter for several rows

I have a pbd file, which has the following format: TITLE Protein X MODEL 1 ATOM 1 N PRO 24 45.220 71.410 43.810 1.00 0.00 ATOM 2 H1 PRO 24 45.800 71.310 42.000 1.00 0.00 TER ENDMDL Column 22 is the chain... (5 Replies)
Discussion started by: Egy
5 Replies

2. Shell Programming and Scripting

awk to add space between text

I am trying to use awk to add a space in a string of text. My awk is close but does not produce the desured output. Thank you :). input washington aveLansing, MI washington streetLansing, MI Desired output washington ave Lansing, MI washington street Lansing, MI awk -F"\t"... (9 Replies)
Discussion started by: cmccabe
9 Replies

3. Shell Programming and Scripting

sed add space X times

Pattern: Mary walks at the park every day with her children sed 's/$/ /' will make it add 1 space at the end (trailing) I want to add X ($VARIABLE) number of spaces (which comes from RANDOM) i.e. VARIABLE='14' then it will do: sed 's/$/ /' = 14 spaces added at the... (10 Replies)
Discussion started by: holyearth
10 Replies

4. UNIX for Dummies Questions & Answers

Try to use awk or sed to get available disk space

Guys this is my 1st post so please excuse if i am asking something already answered I am trying to write a script to send an alert whenever any of my servers runs low on disk space, i am getting the following output 9 Dir(s) 6,611,517,440 bytes free I need to just get 6,611,517,440 from... (2 Replies)
Discussion started by: LinuxNovice83
2 Replies

5. Shell Programming and Scripting

Dot operator and space, Parameter not set

Hi, i have this script setenv.sh if then echo "is empty" fi echo "done" The following is the result when i run the script from command without and with a dot and space operator $ setenv.sh is empty done $ . setenv.sh sh: VAR_1: Parameter not set. $ It's our standard to run... (5 Replies)
Discussion started by: ysrini
5 Replies

6. Shell Programming and Scripting

Remove letter from $1 using awk or sed

I have a file: 575G /local/mis/SYBDUMP I want to remove the G, K, M or T so I can use $1 in awk or sed to do math. I want to end up with a file containing: 575 /local/mis/SYBDUMP It should not matter how small or large the numeric numbers are so if 2, 3, 4, or 5 digits etc I want to see... (9 Replies)
Discussion started by: tamvgi
9 Replies

7. UNIX for Advanced & Expert Users

Sed - add text to start of line if 1st char anything but space

Problem: I have a lot of files, the files first line should always have 4 spaces before any text. Occasionally some of the files will miss the leading spaces and it's a problem. This is only in the first line. So if there are 4 spaces then text, do nothing. If there are not 4 spaces, add 4... (2 Replies)
Discussion started by: Vryali
2 Replies

8. Shell Programming and Scripting

Add white space to the end of a line with sed

Im trying to add 5 blank spaces to the end of each line in a file in a sed script. I can figure out who o put the spaces pretty much anywhere else but at the end. thanks Karl (7 Replies)
Discussion started by: karlanderson
7 Replies

9. Shell Programming and Scripting

using sed to add letter after variable

Hi All, I need to have a sed command insert the letter i at the end of some lines in a file. Problem is that where I want to add the i is after variables that change in each file eg, tsal314384' tsal315386' tsal317392' I need to have it like this ... (2 Replies)
Discussion started by: outthere_3
2 Replies

10. UNIX for Dummies Questions & Answers

How to add a space after an Upper case letter

Hi I have two questions. 1. how to convert "EverythingIsFine" to "Everything Is Fine" in a txt file. 2. how to convert everything to upper case letter and reverse, I hope there is a general purpose script for this. (1 Reply)
Discussion started by: onthetopo
1 Replies
Login or Register to Ask a Question