Hi Dj,

To address the shebang issue ensure the first line of your script file
includes something like:
#!/usr/bin/perl

I don’t know the first thing about Perl, fortunately replacing multiple
spaces with single spaces is a simple search and replace with grep in
BBEdit:

Search for (omitting "):
"\s+"

Replace with (omitting "):
" "

I notice you are also capitalising the first letter of the line.
This can be done with a menu command: Text > Change Case > Capitalize Lines

Hope this helps
Cheers Ollie

On Sun, 13 Jan 2019 at 12:02, Dj <futurevint...@gmail.com> wrote:

> Hello!
>
> I'm trying to replace spaces between words so a sentence like this:
>
> "this     line has      really   messed      up        spacing"
>
> Looks like this:
>
> "This line has really messed up spacing"
>
> I'm only trying to change *space between words and not carriage returns
> and all that.* So far I've tried placing this in the scripts folder:
>
> perl -pe 's/ +/ /g'
>
> I get the *error message:* "This file doesn’t appear to contain a valid
> ‘shebang’ line (application error code: 13304)."
>
> Anyone know *what could be wrong, or have a better expression/way to
> achieve this? Thanks!*
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or need technical support, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to