Linux.com

Home Submit New Event change file name with semicolon by batch

EMail Print Export to ics (for outlook, google calendar, etc...)

change file name with semicolon by batch

Event 

Title:
change file name with semicolon by batch
When:
June 19, 2013 
Where:
sana'a
Category:
Linux Foundation Events

Description

dears.

i have some files come to my server (linx)
these files came with ;1 For example (TTFILE006057;1). the ;1 i don't need it.
so i made a script for it
rename.sh

#!/bin/bash

for i in rename.sh;
do mv "/oracledb/mediation/khaled/TTFILE006057;1" "/oracledb/mediation/khaled/TTFILE006057"
done

it's working but there is a lot of files with same beginning but with different end.
for example (TTFILEXXXXXX;1) the xxxxxx is changing number.
so can any one modif it please.

and i want this script keep working all time and work as loop.

also i want to add the file name after changeing to another .txt file

please help

Venue

Map
Venue:
yemen
Street:
sana'a
ZIP:
967
City:
sana'a
State:
ok
Country:
Country: ye

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board