mkdir naming variable
I am trying to make a batch command set that will convert files from .NEF to .jpg and place them in a directory with the same name as the parent + jpg attached to the end within the parent directory.
Code:
mkdir $(name of parent directory + jpg) # ie /test would now contain /testjpg as a sub directory#; ufraw-batch --out-type=jpg *.NEF ; mv *.jpg testjpg |
I am not sure I follow 100% but are you looking for something like:
Code:
mkdir "${PWD}jpg" |
that makes testjpg a sister directory to test, not a child of test which is what I want, but many thanks
|
Nef is propriety used on nikon slrs, how will you get the conversion done? I don't think a simple rename will work.
|
Quote:
Code:
home$:mkdir "${PWD}jpg" |
Quote:
|
Quote:
Code:
Study@Study:~$ ls |
Sorry .. I forgot about the full path being there :(
Try: Code:
mkdir "${PWD##*/}jpg" |
Quote:
|
Search on this page for ${var##Pattern}
|
All times are GMT -5. The time now is 02:24 AM. |