Answered Questions

  • Shell Script to Add File Extension

    Write a small shell script that adds an extension ".new" to all the files in a directory.

    Nawaz

    • Jun 9th, 2017

    For f in *; do mv $f ${f}.new; done

    Nawaz

    • Oct 25th, 2016

    For item in `ls`; do mv $item ${item}.new; done

    Code
    1. for item in `ls`; do mv $item ${item}.new; done