Sponsored Content
Top Forums Shell Programming and Scripting How to build a command in a script Post 302254572 by babajuma on Tuesday 4th of November 2008 06:41:10 PM
Old 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 want to build a script

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

Script Build

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 want to build a script

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

Build script for all shells

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

How to build a command into a string rather than execute the command

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

Please help: Build a sed command and execute it in a script

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

Select command to build menu

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

exec a build command (adduser) in a script

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

Adding SDK Build on Kernel Source Build

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

Build.xml invocation by Build Script

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
RECODE(1)								FSF								 RECODE(1)

NAME
recode - manual page for recode 3.6 SYNOPSIS
recode [OPTION]... [ [CHARSET] | REQUEST [FILE]... ] DESCRIPTION
Free `recode' converts files between various character sets and surfaces. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short option also. Similarly for optional argu- ments. Listings: -l, --list[=FORMAT] list one or all known charsets and aliases -k, --known=PAIRS restrict charsets according to known PAIRS list -h, --header[=[LN/]NAME] write table NAME on stdout using LN, then exit -F, --freeze-tables write out a C module holding all tables -T, --find-subsets report all charsets being subset of others -C, --copyright display Copyright and copying conditions --help display this help and exit --version output version information and exit Operation modes: -v, --verbose explain sequence of steps and report progress -q, --quiet, --silent inhibit messages about irreversible recodings -f, --force force recodings even when not reversible -t, --touch touch the recoded files after replacement -i, --sequence=files use intermediate files for sequencing passes --sequence=memory use memory buffers for sequencing passes -p, --sequence=pipe use pipe machinery for sequencing passes Fine tuning: -s, --strict use strict mappings, even loose characters -d, --diacritics convert only diacritics or alike for HTML/LaTeX -S, --source[=LN] limit recoding to strings and comments as for LN -c, --colons use colons instead of double quotes for diaeresis -g, --graphics approximate IBMPC rulers by ASCII graphics -x, --ignore=CHARSET ignore CHARSET while choosing a recoding path Option -l with no FORMAT nor CHARSET list available charsets and surfaces. FORMAT is `decimal', `octal', `hexadecimal' or `full' (or one of `dohf'). Unless DEFAULT_CHARSET is set in environment, CHARSET defaults to the locale dependent encoding, determined by LC_ALL, LC_CTYPE, LANG. With -k, possible before charsets are listed for the given after CHARSET, both being tabular charsets, with PAIRS of the form `BEF1:AFT1,BEF2:AFT2,...' and BEFs and AFTs being codes are given as decimal numbers. LN is some language, it may be `c', `perl' or `po'; `c' is the default. REQUEST is SUBREQUEST[,SUBREQUEST]...; SUBREQUEST is ENCODING[..ENCODING]... ENCODING is [CHARSET][/[SURFACE]]...; REQUEST often looks like BEFORE..AFTER, with BEFORE and AFTER being charsets. An omitted CHARSET implies the usual charset; an omitted [/SURFACE]... means the implied surfaces for CHARSET; a / with an empty surface name means no surfaces at all. See the manual. If none of -i and -p are given, presume -p if no FILE, else -i. Each FILE is recoded over itself, destroying the original. If no FILE is specified, then act as a filter and recode stdin to stdout. AUTHOR
Written by Franc,ois Pinard <pinard@iro.umontreal.ca>. REPORTING BUGS
Report bugs to <recode-bugs@iro.umontreal.ca>. COPYRIGHT
Copyright (C) 1990, 92, 93, 94, 96, 97, 99 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for recode is maintained as a Texinfo manual. If the info and recode programs are properly installed at your site, the command info recode should give you access to the complete manual. Free recode 3.6 January 2003 RECODE(1)
All times are GMT -4. The time now is 04:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy