Batch Rename Firmware Files

Easy Shell OS
Solve this problem

Write a shell script that renames firmware builds by appending a timestamp and target platform. This is useful in CI pipelines to avoid overwriting artifacts.

Constraints

  • Accept directory as parameter.
  • Rename *.bin to firmware_<platform>_<timestamp>.bin.
  • Platform read from ENV PLATFORM.
  • Use date command for timestamp.
  • Output list of renamed files.
  • Error if directory not found.
Starter codeShell
1#!/bin/bash2# TODO