![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Associated array from command line options | jperret | Shell Programming and Scripting | 1 | 01-10-2008 05:16 PM |
| launch a command only if | Minguccio75 | UNIX for Advanced & Expert Users | 10 | 02-16-2007 07:48 AM |
| Split Command options | mohdtausifsh | UNIX for Advanced & Expert Users | 7 | 10-04-2006 07:28 AM |
| replacing a string in a file with command line parameter | chiru_h | Shell Programming and Scripting | 5 | 08-03-2006 09:34 AM |
| Executing command line options | Safia | High Level Programming | 8 | 07-04-2002 03:50 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to? launch command with string of command line options
my description from another thread...
Quote:
Code:
#!/bin/bash
IFS=$'\n'
function OutputName() {
input=$1
echo $input
input=`echo "$input" | sed -e 's/.[Aa][Vv][Ii]//'`
input=`echo "$input".avi`
output_name=$input
}
if [[ -z "@ARGV" ]]; then
echo "arguements are files to combine"
exit
else
if [[ ! -e $1 ]]; then
echo "no such input video!"
exit
else
first=`find "$1" -printf "%f"`
echo "Input File Found!: $first"
shift
fi
OutputName $first
echo "Output video name will be: "$output_name""
echo
fi
options="--audio-map --force-b-frame --force-unpack --rebuild-index"
appendlist=""
until [ -z "$1" ]
do
# echo "$1"
# echo "$appendlist"
if [[ ! -e $1 ]]; then
echo "no such input video! $1"
exit
else
filename=`find "$1" -printf '"%f"'`
appendlist="$appendlist $options --append $filename"
fi
# echo "$appendlist"
# echo
shift
done
echo "avidemux2_cli --nogui $options --load \"$first\" $appendlist --force-smart --save \"$output_name\" --quit"
|
|
||||
|
I didn't read your code too carefully, so I could have missed something, but is there anything wrong with
Code:
echo 'some "command" --with options' | sh Code:
dhummy=`some "command" --with options` Code:
fnord='some "command" --with options' eval $fnord |
|
||||
|
because I get this as the output:
Quote:
|
|
||||
|
How exactly did you manage to produce that error message? It looks like you had double-quoted the whole command, where you shouldn't.
If you change it back to echo, doesn't ../combine-0.1 | sh do what you want? |
| Sponsored Links | ||
|
|