{
  "alfredsnippet" : {
    "snippet" : "pad_string() {\n\n        # 定義終端機寬度變數，如果要固定寬度可以將註解取消\n        term_width=80\n\n        # 取得終端機寬度\n        # term_width=\"$(tput cols)\"\n\n        padding=\"$(printf '%0.1s' ={1..500})\"\n\n        printf '%*.*s %s %*.*s\\n' 0 \"$(((term_width - 2 - ${#1}) \/ 2))\" \"$padding\" \"$1\" 0 \"$(((term_width - 1 - ${#1}) \/ 2))\" \"$padding\"\n}\n\npad_string \"Hello, World!\"",
    "uid" : "A25657F9-0678-44D4-A692-094FA964AB4A",
    "name" : "pad_string_centered",
    "keyword" : ""
  }
}