Search Results

Search: Posts Made By: Monkey Dean
10,214
Posted By Monkey Dean
Thanks Rakeshawasthi! Worked perfectly :)
Thanks Rakeshawasthi! Worked perfectly :)
10,214
Posted By Monkey Dean
sed script to remove nth characters from end of filename
Hi all,

I have this basic script to remove, in this case 9 characters from the end of a file name. This is what I have so far,

for file in *.mov
do
newname=`echo $file | sed...
3,742
Posted By Monkey Dean
ghostdog74, This is what I have so far,...
ghostdog74,

This is what I have so far, running this from /bin/sh

for file in *.pdf
do
mv $f `cut -c 12- <<END
$f
END
`
done
3,742
Posted By Monkey Dean
ghostdog74, I've learnt that the simpler way...
ghostdog74,

I've learnt that the simpler way to do this would be to delete a certain amount of text from the end of the filename. This would be the easiest way to do it. I appreciate all the...
3,742
Posted By Monkey Dean
Script to delete text from the end of a filename
Hi all,

I am trying to write a script that will delete a certain amount of text from the end of a filename.

For example.

Input:

name of file (more text).pdf

Output:

name of file.pdf...
3,350
Posted By Monkey Dean
Bash Script - Removing Year and Text from File Name
Hi,

I have files with names in the following naming pattern,

Name.of.movie[2008]moretext-moretext.mov

or

Name of movie[2008]moretext-moretext.mov

And I would like to delete the [year]...
15,935
Posted By Monkey Dean
Colmar THAT'S AWESOME!!! THANK YOU FOR NOT ONLY...
Colmar THAT'S AWESOME!!! THANK YOU FOR NOT ONLY GIVING ME THE SCRIPT I NEEDED BUT EXPLAINING THE WHOLE THING AS WELL.

Thanks Again. :D:D:D:D:D:D
15,935
Posted By Monkey Dean
How to remove numbers from filename
Hi all,

Can I edit this script:

find . -type f | while read i;do [ "$i" != "${i//abc/}" ] && mv "$i" "${i//abc/}" ;done

so that it will not only take out abc from the filename but also take...
1,872
Posted By Monkey Dean
I think the best way to describe this and...
I think the best way to describe this and simplify the matter would be to say -

Can I edit this script:

find . -type f | while read i;do [ "$i" != "${i//abc/}" ] && mv "$i" "${i//abc/}" ;done
...
1,872
Posted By Monkey Dean
Can anyone help me on this one?
Can anyone help me on this one?
1,872
Posted By Monkey Dean
(find . -type f | while read i) Deleting Dates
Hi all,

I currently use this code to delete text from file names when they are dropped in a folder.

find . -type f | while read i;do [ "$i" != "${i//2009abc/}" ] && mv "$i" "${i//2009abc/}"...
21,404
Posted By Monkey Dean
Devaraj, WORKED PERFECTLY!!!!! Thanks...
Devaraj,

WORKED PERFECTLY!!!!!

Thanks Again. :)
21,404
Posted By Monkey Dean
Devaraj, Ok I get it now... Is there a...
Devaraj,

Ok I get it now...

Is there a way to not have to put in the filename? So the script changes any file in the folder that has a .mov extension?

tr '.' ' ' < *.mov | sed 's/\(.*\)...
21,404
Posted By Monkey Dean
Devaraj, Thanks for the quick reply! ...
Devaraj,

Thanks for the quick reply!

Sorry for asking a stupid question but do I run the tr script from terminal on a mac or save as a shell script.

Or something completely different
21,404
Posted By Monkey Dean
Replace multiple dots (.) with spaces ( )
Hi all,

I have files in the filename pattern of,

this.is.the.name.of.my.file.mov


and I would like to remove dots (.) and replace them with spaces ( ) so the output would be,

this is the...
Showing results 1 to 15 of 15

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