I executed the following code on WinXP with cygwin:
Code:
#!/bin/bash
old_path=/cygdrive/c/Data/DBA
for f in $(find $old_path -type f)
do
nf=$(echo $f|tr '/' '_')
echo $nf
done
Don't know why yours does not work!
These are the partial results:
$ ./Scripts/bin/test.ksh
_cygdrive_c_Data_DBA_.bash_profile.txt
_cygdrive_c_Data_DBA_.profile.txt
_cygdrive_c_Data_DBA_Admin_db.mdb
_cygdrive_c_Data_DBA_afiedt.buf
_cygdrive_c_Data_DBA_alert68.log
_cygdrive_c_Data_DBA_CallExtProcPLSQL.htm
_cygdrive_c_Data_DBA_CallExtProcPLSQL_files_back_b utton.gif
_cygdrive_c_Data_DBA_CallExtProcPLSQL_files_header _oracle.gif
_cygdrive_c_Data_DBA_CallExtProcPLSQL_files_home_b utton.gif
_cygdrive_c_Data_DBA_ccmt.mdb