cp $var1 var2 doesn't work
I'm running a bash script on a Raspberry Pi to control LED pixels. I'm stuck on a basic copy command.
I have a variable called nexttemp which contains the string B_254_TieDyeKaleidoscope.fseq That file, in the same directory, is a large binary file that I'm trying to copy to a file called MasterFseq.fseq If I do a cp nexttemp MasterFseq.fseq then MasterFseq.fseq contains the B_254_TieDyeKaleidoscope.fseq file name. I want instead to have copied the binary file to MasterFseq.fseq. It's my understanding that a $nexttemp will point to the binary file and not the name of it but when I do a cp $nexttemp MasterFseq.fseq the $nexttemp is thrown away and I'm told there is no destination file name, eg. root@FPP:/home/pi/media/sequences# echo cp $nexttemp MasterFseq.fseq + echo cp MasterFseq.fseq cp MasterFseq.fseq How do I get the binaray file, which is named in nexttemp, copied to MasterFseq.fseq? John |
Looks like you have a file called nexttemp, not a variable.
What does "echo $nexttemp" give - I'm guessing nothing. |
Quote:
First set by: Code:
export nexttemp="B_254_TieDyeKaleidoscope.fseq" |
Quote:
|
Quote:
Brain fade is so discouraging. Thanks for everyone's input. Great forum. |
All times are GMT -5. The time now is 07:45 AM. |