• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trim space chars from start of line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trim space chars from start of line


  • Subject: Re: Trim space chars from start of line
  • From: Doug McNutt <email@hidden>
  • Date: Thu, 28 Jul 2011 11:43:44 -0600

At 10:35 -0700 7/28/11, Zavatone, Alex wrote:
>
>You sir, are a benefit to humanity.
>
>Now, how can I find out why that does what that does?
>
>On Jul 25, 2011, at 2:20 PM, Christopher Stone wrote:
>
>>on trimLeadingWhiteSpace(str)
>>	set cmd to "sed -nE 's/^[	 ]*//p'<<<" & quoted form of str
>>	do shell script cmd
>>	return result
>>end trimLeadingWhiteSpace
>>

In Terminal.app use

man sed

Or on the WWW search for +sed +manual

sed stands for stream edit. It has been around for longer than any Macintosh.

--
1801 - Joseph Marie Jacquard uses punch cards to instruct a loom to weave "hello, world" into a tapestry.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Trim space chars from start of line (From: "Zavatone, Alex" <email@hidden>)
 >Re: Trim space chars from start of line (From: Christopher Stone <email@hidden>)
 >Re: Trim space chars from start of line (From: "Zavatone, Alex" <email@hidden>)

  • Prev by Date: Re: Trim space chars from start of line
  • Next by Date: Re: Trim space chars from start of line
  • Previous by thread: Re: Trim space chars from start of line
  • Next by thread: Re: Trim space chars from start of line
  • Index(es):
    • Date
    • Thread