How to convert .aiff to .caf through converter or programmatically? [closed] - ios

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Any one knows how I can convert my .aiff audio file to .caf audio file?
Any Converter any link will be helpful.
Thanks in advance.

This is how to do it in terminal:
afconvert -f caff -d aacl#22050 -c 1 sound.aiff sound.caf
All files in directory script:
for f in *; do
if [ "$f" != "converttocaf.sh" ]
then
/usr/bin/afconvert -f caff -d 'aac ' -c 1 -l Mono $f
echo "$f converted"
fi
done

I have directly converted a wav file in caf file by using this command:
afconvert -f caff -d LEI16 -c 1 trampoline.wav trampoline.caf
you can also find some useful commands about the best practices to convert the file extentions on the fillowing link:
http://gamua.com/blog/2010/06/sound-on-ios-best-practices/

Related

Bash script to grep string from latest files in folder [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Can you help me with a bash script to grep string from latest files in folder. e.g. I have a folder /var/log/folder with some files, and I need to every 30 seconds grep text string some string from latest 5 files and result should be written in file /var/log/file.txt.
Thank you in advance!
This should do it
You'd need to put it into cron
cd /var/log/folder && grep "some string" `ls -c | head -n 5\` > /var/log/file.txt
if you need to append to the log, use >> rather than >
You can use below script. Just modify condition in while loop as per your requirement.
#!/bin/bash
mydir="/var/log/"
rm ${mydir}/file.txt
while [ 1 ]
do
date >> ${mydir}/file.txt
ls -tr ${mydir}/folder/ | tail -n 5 | awk -v var="${mydir}" '{print var"/folder/"$1}' | xargs grep "Some String" >> ${mydir}/file.txt
sleep 30
done

zfc-rbac module exception [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I integrated the module zfcrbac in my application, apparently there's a problem! when I execute I get the following exception:
Fatal error: Uncaught exception 'Zend \ ServiceManager \ Exception \ ServiceNotCreatedException' with message 'While Attempting to create zfcrbacguards (alias: ZfcRbac \ Guards) WAS an invalid factory registered for this instance types.' in C: \ wamp \ www \ SSO \ vendor \ ZF2 \ library \ Zend \ ServiceManager \ ServiceManager.php on line 1031
I added nothing! just put the module in the vendor directory!
There was a namespaces problem in ini_autoloader.php , i added namespace of zfc-rbac module and it works

Update XCode from command-line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Is it possible to update XCode to a newer version without using the XCode GUI? So far I can only find the solution for the Xcode-CLI-tools, but not the actual XCode itself.
Run this:
curl -Ls https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex | plutil -convert json -o - - | python -mjson.tool | less
Replace the URL in this simple shell script and run it:
#!/bin/sh
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
# Get Xcode CLI tools
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex
TOOLS=clitools.dmg
if [ ! -f "$TOOLS" ]; then
if [ "$OSX_VERS" -eq 7 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg
elif [ "$OSX_VERS" -eq 8 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_mountain_lion_april_2013.dmg
elif [ "$OSX_VERS" -eq 9 ]; then
DMGURL=http://adcdownload.apple.com/Developer_Tools/command_line_tools_os_x_mavericks_for_xcode__late_october_2013/command_line_tools_os_x_mavericks_for_xcode__late_october_2013.dmg
fi
curl "$DMGURL" -o "$TOOLS"
fi
TMPMOUNT=`/usr/bin/mktemp -d /tmp/clitools.XXXX`
hdiutil attach "$TOOLS" -mountpoint "$TMPMOUNT"
installer -pkg "$(find $TMPMOUNT -name '*.mpkg')" -target /
hdiutil detach "$TMPMOUNT"
rm -rf "$TMPMOUNT"
rm "$TOOLS"
exit
You may be interested to ask why would anyone want to do that, but I have an use case where we have 10+ Mac Minis to manage in our build farm and we would prefer not to update one-by-one on the GUI.

how to append a line to all files under a directory? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have a directory contains 50 files, what I need to do is append a new text to echo file, such as 'thelastline`, I don't know how to do it in mac os
sed -i '$athelastline' /path/*.file
if you are using bsd sed, the -i option would be -i ''
sed -i '' '$athelastline' /path/*.file
Find all files in current directory and below and append lastline to each:
$ find . -type f -exec sed -i '$a lastline' {} \;
Under OSX this is probably easiest with sed, but you seem to be asking about how to do this with awk, so here is a nawk compatible way of doing it (assuming you do not have strange characters in your filenames):
for f in *; do
awk '1; END { print "thelastline" }' "$f" > /tmp/tmpfile
mv /tmp/tmpfile "$f"
done
In case you are using zsh, there is a nice idiom for appending something to all files in the current directory:
<<<"thelastline" >>*
Note that multios needs to be enabled.

xargs: zcat: terminated by signal 13 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have used a script like below
zgrep -i xxxx FileA|grep -o "RID=[0-9|A-Z]*"|uniq|cut -d "=" -f2|xargs -0 -I string zcat FileB| requestID="RequestID=" stringone=$requestID$string grep stringone FileB
Before the point of xargs being used my o/p is
01982893213982312 - RID 1
32103213213213213 - RID 2
32103213213213343 - RID 3
32103213213251261 - RID 4
For every RID present here, there is a corresponding line in File B. I am planning to do like the below after the:
zgrep -i xxxx FileA | grep -o "RID=[0-9|A-Z]*" | uniq | cut -d "=" -f2 | xargs|
{grep RID1 in file B, grep RID2 in file B,grep RID3 in file B, grep RID4 in file B}
Now if I do this I am getting an error
xargs: zcat: terminated by signal 13
Please help me guys

Resources