1 Minute Tech Tips

Support engineers with one-minute articles.

  • About
  • Profile
Close Button
Menu Button Search Button
Close Button
  1. ホーム
  2. tech
no-image

tech

年月を、シェルでゼロ埋めする

2021年8月4日 2021年8月4日

  • Facebook icon
  • Twitter icon
  • Hatena Bookmark icon
  • Pocket icon
  • Feedly icon
  • Line icon

MONTH や DAY が 8 (一桁) の時、

YYYYMMDD 形式でフォーマットが崩れないようにするためのワンライナー

YYYYMMDD=${YEAR}$(printf "%02d" ${MONTH})$(printf "%02d" ${DAY})

  • Facebook icon
  • Twitter icon
  • Hatena Bookmark icon
  • Pocket icon
  • Feedly icon
  • Line icon

関連記事

  • no image

    WARNING: The command completed successfully but no settings of ‘sumito.tsukada’ have been modified.

  • VyOSでルーティングを設定する

  • vixie-cronはAmazon Linuxでは利用できない

  • no image

    Powershell の [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): をスキップする

  • no image

    Micro Instance with burstable CPU running in Americas

  • no image

    jq コマンドのシングルクォート内に変数を渡す

  • redash パラメータを動的に変えてクエリを実行する

  • no image

    fatal: unable to access ‘https://gopkg.in/yaml.v2/’: server certificate verification failed. CAfile: none CRLfile: none

  • person doing wall graffiti

    Poetryでインストールしてあるパッケージのバージョンを変更する

  • A Close-Up Shot of Letter Dice on an Open Notebook

    ターミナル操作の効率化:cdコマンドを使った直前のディレクトリへの素早い移動方法

2021年8月
月 火 水 木 金 土 日
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« 7月   9月 »

Profile

Certifications

As a testament to my expertise and commitment to lifelong learning, here are some of the professional certifications I have earned:

最近の投稿

  • Ubuntuにおけるタイムゾーン設定の自動化:手動選択を回避する方法
  • AWS SAM CLIでPython 3.11のビルドエラーを解決する方法
  • Dockerの未タグ付けイメージを一括削除:ストレージの最適化方法
  • Dockerビルドエラーの解消: ストレージ不足とその対処法
  • GitLab CIを利用してSSHキーを安全に管理する

カテゴリー

  • autify (1)
  • azure (3)
  • Book review (21)
  • laravel (16)
  • run (1)
  • tech (375)
    • aws (121)
      • AWS Certified Security – Specialty (7)
      • AWS Certified Solutions Architect – Associate (24)
      • AWS Certified Solutions Architect – Professional (28)
    • docker (32)
    • GCP (21)
    • go (15)
    • kusanagi(wordpress) (7)
    • linux (63)
    • Mac (12)
    • mysql (9)
    • python (18)
    • redash (17)
    • SQL (2)
    • terraform (1)
    • Vue.js (5)
    • 機械学習 (7)
  • _ (1)
  • 振り返り (2)
  • 未分類 (2)
  • About
  • Profile
© 2023 1 Minute Tech Tips

Made by Godios. Theme