home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Send Text To STDOUT Without A Newline In JXA/OSA Script

October 2023
Code
#!/usr/bin/env osascript -l JavaScript

ObjC.import('Foundation');

const send_stdout = (text) => {
  $.NSFileHandle.fileHandleWithStandardOutput.writeData($.NSString.alloc.initWithString(String(text)).dataUsingEncoding($.NSNEXTSTEPStringEncoding))
}
═══ § ═══

Footnotes And References