Upload files to "OS/bash/Week3"
This commit is contained in:
parent
e27e2c7837
commit
a815332403
5 changed files with 56 additions and 0 deletions
11
OS/bash/Week3/q3.sh
Normal file
11
OS/bash/Week3/q3.sh
Normal 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
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue