Upload files to "OS/bash/Week3"

This commit is contained in:
Aadit Agrawal 2025-01-17 10:49:57 +05:30
parent e27e2c7837
commit a815332403
5 changed files with 56 additions and 0 deletions

11
OS/bash/Week3/q3.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
echo "Changing all files with .txt to .text"
x=`find . -type f -iname "*.txt"`
for i in $x;do
j=`echo "$i" | cut -d '.' -f 2`
echo $j
mv $i ./$j.text
done