• 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: Removing spaces from a list in a Text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing spaces from a list in a Text file


  • Subject: Re: Removing spaces from a list in a Text file
  • From: Philip Aker <email@hidden>
  • Date: Sun, 04 Nov 2007 01:58:34 -0700

On 2007-11-04, at 01:22, Peter Baxter wrote:

I am looking for a script step that would remove all spaces from a list in a .TXT file that contains a list like the one below.  Everything I tried removes the returns as well

AND ,Julie Anderson,VC7B      ,7,7B,13,9,22,2,  2.00,
,,ART7G     ,7,7G,13,8,21,2,  2.00,
,,VC7O      ,7,7O,16,,16,2,  2.00,
,,ART8B     ,8,8B,12,12,24,2,  2.00,
,,IP8R      ,8,8R,12,13,25,2,  2.00,
,,ART8R     ,8,8R,12,13,25,2,  2.00,
,,ART9O     ,9,9O,11,10,21,2,  2.00,
,,AST10     ,10,,5,20,25,4,  4.00,
,,2ND       ,Yard Duty,,,,0,1,  0.00,
,,,,,,Totals ,,22, 20.00,/23

Try this:

set pfile to quoted form of (POSIX path of ((path to desktop folder as text) & "some.txt"))
do shell script "cat " & pfile & " | tr -d ' ' "


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

 _______________________________________________
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

  • Follow-Ups:
    • Re: Removing spaces from a list in a Text file
      • From: Philip Aker <email@hidden>
References: 
 >Removing spaces from a list in a Text file (From: Peter Baxter <email@hidden>)

  • Prev by Date: Removing spaces from a list in a Text file
  • Next by Date: Re: Removing spaces from a list in a Text file
  • Previous by thread: Removing spaces from a list in a Text file
  • Next by thread: Re: Removing spaces from a list in a Text file
  • Index(es):
    • Date
    • Thread