ดูด URL ลับของ iTunes โดยง่าย

โจทย์มีอยู่ว่า เรามักจะเข้าไปตรวจสอบความเป็นไปของ iTunes ว่ามีอะไรที่ปรับปรุงเปลี่ยนแปลงบ้าง (เช่น iPod Software Update, iPhone Software Update) โดยที่เรารู้ URL ลับอันนั้น แต่เราไม่ต้องการที่จะเปิดดูผ่านทาง Browser เพราะการแสดงผลมันไม่เป็นระเบียบสวยงาม

คำตอบ ด้วยคำสั่งทาง Terminal ของ Mac OS X พื้นฐานคือคำสั่ง curl และ open ก็ทำให้เราสามารถสร้าง Flow เล็กๆ สำหรับดูข้อมูลนี้ โดยการพิมพ์คำสั่งต่อไปนี้

curl -L -s URL_อันนั้น | open -f -a /Developer/Applications/Utilities/Property\ List\ Editor.app

หรือ

curl -L -s URL_อันนั้น | open -f -a Property\ List\ Editor

สำหรับ Argument อันหลังของคำสั่ง open ใช้สำหรับบอกให้เปิดไฟล์ที่โหลดมาด้วยโปรแกรม Property List Editor ที่มาพร้อมกับ Xcode นั่นเอง (จริงๆ น่าจะบังคับให้มันรู้ว่าโหลด plist มาได้นะ จะได้ไม่ต้องมา -a ในทีหลัง)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <tt> <sup> <sub> <img> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can link nodes to other nodes using the following syntax:
    [node:node_id,title="val2"]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.