scripting - Bash variables not acting as expected -


I have a bass script that parses a file line by line, a cut command And then make a folder using that date, however, it seems that my variable is not being populated properly Do I have a syntax issue? Any help or direction for external resources has been highly appreciated.

  #! / Bin / bash ls | Grep .mp3 | Cut-D '. -f 1 & gt; Philostomomed Cat Filestabiva | While reading the line varYear = $ line | Cut-D'_ '-f3 varMonth = $ line | Cut-D'_ '-f4 varDay = $ line | Cut-D'_ '-f5 Buzz $ varMonth mkdir $ varMonth' _ '$ varDay' _ '$ varYear cp ./$line'.mp3' ./$varMonth'_'$varDay'_'$'varYear/$ Line '. Mp3 'done'   

You have many errors and non-suggested behavior codes. Try the following:

  f * * .mp3; Do f = $ {f %%} *} IFS = _read _ _ var var $ $ varMonth mkdir -p "$ $ varMonth} _ $ {varDay} _ $ {varYear}" cp "$ f.mp3" "$ $ {varMonth} _ $ {varDay} _ $ {varYear} / $ resonance is f.mp3 "done    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -