Skip navigation

End up w. text list of Project names?

1968 Views 20 Replies Latest reply: Jul 30, 2013 9:32 AM by Kirby Krieger RSS
  • Frank Caggiano Level 7 Level 7 (22,760 points)
    Currently Being Moderated
    Jul 25, 2013 7:36 PM (in response to léonie)

    I tried to count exacly, but "wc -l" from the Terminal did not work. There do not seem to be <newline> characters in the textfile, so I had to count the words

    right the script is putting a return (\r) between each project name with this line

    set AppleScript's text item delimiters to return

    rather then the Unix line ending newline (\n). You could convert the \r to \n using tr

     

    Pandora:Desktop frank$ tr '\r' '\n' < source.txt > dest.txt

  • léonie Level 8 Level 8 (46,375 points)
    Currently Being Moderated
    Jul 25, 2013 10:39 PM (in response to Frank Caggiano)

    rather then the Unix line ending newline (\n). You could convert the \r to \n using tr

     

    Pandora:Desktop frank$ tr '\r' '\n' < source.txt > dest.txt

    A good idea to use the "tr" command to replace the return.

     

    And a surprising result - the translate "tr" quits with "tr: Illegal byte sequence" 

     

    Comparing the source and destination reveals, that Aperture used an "Umlaut" charachter "ä" for one of the automatically generated monthly Photo Stream project names "Mär 2013 Photo Stream". That must have happenend, when I temporarily had set the language to German, when helping a german OP.

    I would not have expected Aperture to generate project names, that cannot be processed by the shell.

  • Frank Caggiano Level 7 Level 7 (22,760 points)
    Currently Being Moderated
    Jul 29, 2013 11:31 AM (in response to Kirby Krieger)

    Glad it worked.

     

    So are you biking again? I thought I remember you writing that you had to stop due to an accident on the bike? Good news if you are.

     

    I've been out a lot lately, July is always a heavy month. Did my first century in a long time last Sunday. Come on down, but you might want to wait for cooler weather. Maybe I'll ride up to Pa, better have more then one in the cooler though

     

    regards

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.