I need to test bunch of FLAC files and get all errors into a txt file. I used the following syntax which is very common and usually works fine with all programs:
c:\temp\FLAC\flac.exe -t myflacfile.flac >> c:\temp\report.txt
But it surprisingly doesn't work! No idea why error messages can't be catched. The report file gots created though. Please share your thoughts, cause' I haven't find a word on the Net about it.
The problem is in syntax. There is extra space in command line before an output filename. Commands like
flac.exe -t 1.flac 2>>a.txt
or
flac.exe -t 1.flac 2>a.txt
are working well.
Related
I have to deploy from a git Diff to a Salesforce Org.
So I have all the files names written on a txt file and need to bring them all to the Salesforce Org.
The files I have them in local and need to, as I said, deploy them to the Salesforce Org.
I tried doing sfdx and writing them all but it gives me
"C:\Program" is not a reconized command
I tried adding """ at the start and """ at the end and separating each file with a "","" but it still doesn't work.
I know I can do it from a xml file but I have the diff in a txt.
The error sounds like your sfdx isn't installed correctly, you may have to reinstall. Or maybe you had newlines in your command and they messed something up?
You need to read up about force:source:deploy command, the -p parameter...
This is a decent example of what you can do. Bit boring, repetitive but deploys exactly these files and nothing more, not whole folders.
sfdx force:source:deploy -u prod -p "force-app/main/default/objects/MyObject__c/fields/Description__c.field-meta.xml,force-app/main/default/objects/MyObject__c/fields/Amount__c.field-meta.xml,force-app/main/default/objects/MyObject__c/fields/Quantity__c.field-meta.xml,force-app/main/default/classes/MyObjectTriggerHandler.cls" -l RunSpecifiedTests -r "SomeTestClass" --verbose --loglevel fatal
There are also some cool sfdx plugins that will generate the xml file for you based on difference between 2 commits? Search list at https://github.com/mshanemc/awesome-sfdx-plugins
I am trying to run a script which finds the pitch of a waveform, however I am getting an error that it cannot open a wav file, and I don't know why this is.
The code is:
../../SPTK-3.11/bin/pitch/pitch -a 0 -s 16.0 -p 80 -t0 0.0 -L 40 -H 150 -o 1 ../wav/*.wav > f0
And the error is:
Cannot open file ../wav/arctic_a0254.wav!
There are around 500 wav files in the folder, so I don't know why it doesn't list the first here if there is a problem with the path or the file
I have already tried doing ls ../wav which shows all the files as being in that directory, and did open ../wav/arctic_a0254.wav which also worked, so I don't know why there is an error here.
EDIT: I tried removing the wav file from the folder, and got the same error with the proceeding wav file (arctic_a0255.wav), so I don't think it is to do with the individual wav file.
EDIT2: The script lists the error as occurring when there is an error seeking the beginning of the audio container, but I'm not sure what this means
EDIT3: Solved! The issue was the file not being a float, so I converted the wav in audacity and the script worked as normal
I believe that the program you are executing, pitch, runs out of file descriptors.
I don't know whether it fails to close already used files, thus leaking file descriptors, or whether it really needs to keep all those files open for performing its task, which would be more difficult to fix.
You can try to strace it and see the exact error you get from the read() system call just before bailing out.
Do you have access to the source?
Can you run it in smaller batches?
I have a problem with writing the output of a program to a different directory when I loop different files as variables as inputs. I run this in the command line. The problem is that I do not know how to "tell" the program to put the output with a changed filename into another directory than the input directory.
Here is the command, although it is a bioinformatic tool which requires specific input file formats. I am sorry that I could not give a better example. Nonetheless, the program is called computeMatrix in a software-tool box called deeptools2.
command:
for f in ~/my/path/*spc_files*; do computeMatrix reference-point--referencePoint center --regionsFileName /target/region.bed --binSize 500 --scoreFileName "$f" **--outFileName "$f.matrix"** ; done \
So far, I tried to use the command basename to just get the filename and then change the directory before that. However I could not figure out:
if this is combinable
what is the correct order of the commands (e.g.:
outputFile='basename"$f"', "~/new/targetDir/'basename$f'")
Probably there are other options to solve the problem which I could not think of/ find.
I'm using bash via cygwin on a windows machine to batch-convert several hundreds of wav-files to flac. I wrote a simple script to read each file from a txt-file containing a directory-print I did earlier, convert the linuxpaths to windowspaths and using FLAC to encode the files.
#!/bin
IFS="$(printf '\n\t')"
(for wav in $(cat path/wavfiles.txt)
do
winwav= $(cygpath -w "$wav")
flac --best --verify "$winwav"
sleep 30
done)
The path conversion seems to be working fine: bash expands out the path correctly to a windows path for FLAC to use, but FLAC keeps spitting out the following error message:
ERROR: can't open input file : inavlid argument
I tried encoding the files with a similar script windows batch file and it worked fine, so the files aren't the problem. I searched a lot of sites, including this one and the FLAC-helppages, but I can't seem to find any information concerning this error message. Probably something silly I overlooked, it usually is.
Any ideas?
I have a batch script that looks like this
# echo off
c:/cygwin/bin/bash -li each_sec_extract.bash c:/iperfprocess/sprint/file1.txt > c:/iperfprocess/sprintbashed/file1.txt each_sec_extract.bash c:/iperfprocess/sprint/file2.txt > c:/iperfprocess/sprintbashed/file2.txt
When i run this as is, the CYGWIN bash terminal pops up and I can observe the script producing the output I want on the screen, however, when I go to the directory where the file should be located (c:/iperfprocess/sprintbashed/), I am greeted by an empty text file. When i enter instructions from the CMD line manually, I receive the same result. However, when I run the instruction directly from CYGWIN, it works flawlessly. The part that frustrates me the most, this script used to work fine, then I started getting SED: permission denied errors which forced me to run bash.exe in administrative mode.
Any ideas about what might be happening or what a solution may be? Thank you in advance for any and all help provided.
Is this any different?
#echo off
c:/cygwin/bin/bash -li each_sec_extract.bash c:/iperfprocess/sprint/file1.txt > c:/iperfprocess/sprintbashed/file1.txt
c:/cygwin/bin/bash -li each_sec_extract.bash c:/iperfprocess/sprint/file2.txt > c:/iperfprocess/sprintbashed/file2.txt
The SED: Permission error was the underlying cause of the empty output files that was experienced. Running bash in administrative privileges was only a work around that didn't fix the actual problem. For some reason, sed.exe became corrupt. The solution was comprised of downloading UnxUtils from http://sourceforge.net/projects/unxutils/?source=dlp and replacing the sed.exe found from CYGWIN/bin/ and replacing it with the one in the UnxUtils zip file.
I ran my script after these steps and everything worked perfectly as it did prior to the issue.