Search Results

Search: Posts Made By: Mr_Keystrokes
1,849
Posted By apmcd47
I'm losing the plot here. Could you please show...
I'm losing the plot here. Could you please show an example or two of:

$fldr;
$f_name;
$f

One of the problems I'm having is that if $fldr has values such as

long_john_silver
...
868
Posted By Chubler_XL
How about this; for fldr in ./folder1/* ; do...
How about this;

for fldr in ./folder1/* ; do
basenm=${fldr##*/}
if [[ "$basenm" = *_* ]] && [ -d "$fldr" ]; then
new_fldr=${basenm%%_*}
if [ -d...
2,060
Posted By RudiC
man bash:
man bash:
2,060
Posted By rdrtx1
find . -name *fna.gz | while read f ; do...
find . -name *fna.gz | while read f ; do fl=${f%/*}; fld=${fl##*/} ; echo mv "$f" "$fl/${fld}_${f##*/}" ; done
Test first. To perform rename, update as needed then remove echo
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy