Færdiggjort

Linux bash script removing specific string from filename and everything afterwards while keeping everything before string intact.

1000+ files all in the same folder that need renaming.

Examples:

[login to view URL] > [login to view URL]

[login to view URL] [login to view URL] > [login to view URL] [login to view URL]

even morerandom-Danish [login to view URL] > even [login to view URL]

[login to view URL] > [login to view URL]

more random DANISH even more [login to view URL] > more [login to view URL]

As the Examples above the trigger word is always "Danish" that very in upper and lower case. Also sometimes a sign or space just before "Danish" need to be removed so files wont end up like random2..avi, [login to view URL] or random2 .avi

If "Danish" missing from filename ill like the script to check for the following instead and also delete everything afterwards, but unlike danish keep the season, episode or date and again everything before intact:

s01e01

S01E01

e01

E01

20180925

25092018

2018-09-25

25-09-2018

The above can of cause vary depending on the season, episode or date. If Danish or the above is missing, skip the file.

Evner: Linux, Regular Expressions, Ubuntu

Se mere: mysql linux bash script, linux ftp client bash script, linux bash script delete, sed, remove part of filename linux, sed remove everything before last occurrence of character, how to cut a string after a specific character in unix, how to cut a string before a specific character in unix, bash sed, awk remove everything before character, bash remove everything before last slash, linux bash script process apache access log, linux bash script sample sed, linux bash script log, linux bash script ftp, linux bash script installer mysql, linux bash script argument pass, linux bash script insert_record sh, linux bash script message day, linux bash script sed examples

Om arbejdsgiveren:
( 0 bedømmelser ) Gråsten, Denmark

Projekt ID: #17936857

Tildelt til:

mtriettruong

hi, This kind of string pattern matching should be using Perl to do. I can give your a final utility scrip like: [login to view URL] [DIR].# If you don't give a dir, it will scan the $PWD - current dir. I can draft a sc Flere

€29 EUR på 1 dag
(10 bedømmelser)
3.7

2 freelancere byder i gennemsnit €26 på dette job

prapkengr

- Shell scripting experience in Linux environment. - Practices of Software engineering methodologies - Knowledge & experience in Software quality, Testing & evaluation

€23 EUR på 1 dag
(0 bedømmelser)
0.0