Search Results

Search: Posts Made By: israr75
1,675
Posted By matrixmadhan
I have added sample script for a single file,...
I have added sample script for a single file, please change it to multiple files like

ls file*

Please give it a try and let us know if there are any problems.
1,675
Posted By matrixmadhan
Please post what have you tried, where are you...
Please post what have you tried, where are you struck.

Here is a sample.

ls 12345-zxys.213423.zyz.txt | while read file
do
newfilename=`echo $file | sed 's/^.*-//'`
mv $file $newfilename...
3,160
Posted By RudiC
How about echo /dir1/dir2/dir3/$(date...
How about
echo /dir1/dir2/dir3/$(date +"%Y/%m/%d")/init* | wc -w
1,675
Posted By RudiC
You might want to consider shell's parameter...
You might want to consider shell's parameter expansion (no external cammnd like sed necessary):
for FN in *.txt; do echo mv $FN ${FN#*-}; done
Showing results 1 to 4 of 4

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