11-04-2008
How to handle the - in building a command in the sh script
Ok
i think i am hopefully focusing in on where the problem is.
when i print out $coffee_out at the end and look at it in a hex editor
the line looks like
splitmovie ...splitAt 3 ...self...contained ...o sdfsf.mov recode.mov.
Yet if i write it out by hand i get
splitmovie -splitAt 3 -self-contained -o sdfsf.mov recode.mov
It looks like i am not handling the - properly in the script
Any pointer would be gratefully appreciated
many thanks
michael
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have file which has "A" character in more than 1000 lines and I want replace this "A" with "f". There is also "A" which I don't want to replace at the last line.
Currently, I use this script to replace them one by one
:g/A/s//f/g
Regards (2 Replies)
Discussion started by: mewalter
2 Replies
2. Shell Programming and Scripting
I have a 3 status option 1 , 4 , 6
1 - Active
4 - Temp..
6 - Deactive
I want to build a script which when it finds either of the status options (1,4,6), then returns the relevant string.
txs
:confused: (3 Replies)
Discussion started by: mewalter
3 Replies
3. Shell Programming and Scripting
I have this script
sed -e '$q' -e 's/I/D/g' <inputfile> outfile
which replaces I by D...
I have to run this script in 90 files which their filename starts with CD*. I want to call all these files and execute this command once.
Or schedule it to be executed at 1600hrs every day.
I want... (7 Replies)
Discussion started by: mewalter
7 Replies
4. Shell Programming and Scripting
Hi,
I made a build script for the product I am working on.
The script was made in the /bin/sh shell.
My first line in the script (after the #! /bin/sh and following # lines ) were,
if ; then
/bin/sh
fi;
It works well with my sh shell. I run the script as
sh build.sh
Now I... (9 Replies)
Discussion started by: vino
9 Replies
5. Shell Programming and Scripting
I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example:
mycmd=''
if ...; then
$mycmd='sudo '
fi
$mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile
res=`$mycmd`
(I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies
6. Shell Programming and Scripting
I am using an array to store some data (keys e.g 47975081_1215781266128), it can be assumed that it is key to other data.
I want extract data from a file based on a couple of keys (range) and store the resulting data in a variable using the following command:
sed -n... (9 Replies)
Discussion started by: gugs
9 Replies
7. Shell Programming and Scripting
Hello everyone.
I am using the select command to build a menu, here is my question:
Is it possible to generate a menu which contains several sections and have a separator between the sections without having a selection number generated in front of the separator?
This is a sample of what I would... (1 Reply)
Discussion started by: gio001
1 Replies
8. Shell Programming and Scripting
Hi,
With a awk script i create a "adduser line"
$ cat /tmp/tmp.ldif | awk -f ldif2adduser.awk
adduser --uid 1002 --gid 1000 --gecos "ROUSSIN Guy" --home /homeL/guy --shell /bin/bash --disabled-password guy
If i cut and paste this line, all is fine. But in a shell script i get errors :
... (2 Replies)
Discussion started by: guyr
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
So I downloaded this kernel source and was able to build it successfully.
But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself.
I added the SDK in the main Makefile:
init-y := init/
#added SDK... (0 Replies)
Discussion started by: h0ujun
0 Replies
10. Shell Programming and Scripting
Hi
I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies
LEARN ABOUT DEBIAN
px_set_targetencoding
PX_SET_TARGETENCODING(3) Library Functions Manual PX_SET_TARGETENCODING(3)
NAME
PX_set_targetencoding -- Set encoding for output
SYNOPSIS
#include <paradox.h>
int PX_set_targetencoding(pxdoc_t *pxdoc, const char *encoding)
DESCRIPTION
Sets the target encoding for all alpha fields. It is used when data is retrieved from a record. The encoding must be a name as it is
described by the man and info pages of recode or iconv whatever is used. A common value is `latin1' on Unix systems. If you
do not set the encoding the function PX_get_data_alpha(3) will return field data in the original encoding otherwise it will recode the
field data.
This function is a short cut form PX_set_parameter(pxdoc, "targetencoding", encoding) and is deprecated.
RETURN VALUE
Returns -2 if recoding is not supported and a value < 0 in case of an error, otherwise 0.
SEE ALSO
PX_get_data_alpha(3), PX_set_inputencoding(3), PX_set_parameter(3), iconv(1), recode(1)
AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx.
PX_SET_TARGETENCODING(3)