Sponsored Content
Top Forums Shell Programming and Scripting Pass a string with spaces to a shell script Post 302374313 by vivelafete on Tuesday 24th of November 2009 05:32:15 AM
Old 11-24-2009
Thanks for the fast answer!
Truly i have to say that i hadn't the problem until i use sed which doesn't like the spaces.
I searched at the wrong place, but you helped me!
best regards!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i pass parameter with spaces to csh script

Hello all i need to pass to my shell script parameter that looks like "2 3 3" inside the script i need to use this string that looks like this "2 3 3" but when i try to print the script im getting syntax error , this is my script : set s = $1 echo $s (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Pass string from shell script to java

Hi, I,m writing a program in shell script and currently this script is calling a java program. I have a problem to pass string variable from my shell script to the java program. I don't know on how to pass it and how the java program can call what I have pass from the shell script. This is... (3 Replies)
Discussion started by: badbunny9316
3 Replies

3. Shell Programming and Scripting

Not able to pass string with spaces in shell

I have to pass a sentence in a file, the specs are as: cat run | sed 's/SRT/'$8'/g' | sed 's/plength/68/g' | sed 's/stcol/'$5'/g' | sed 's/encol/'$6'/g' | sed 's/brdtype/'$1'/g' | sed 's/brdtxt/'$3'/g' | sed 's/demotxt/Total '$2'/g' | sed 's/bantxt/ban_'$7'/g' | sed 's/validcodes/'$4'/g' >... (15 Replies)
Discussion started by: patilrakesh1984
15 Replies

4. Shell Programming and Scripting

Pass string arg from shell to perl

My shell script generates a bunch of lines of text and passes this text as an argument to a perl script. I'm able to do this, but for some reason newlines don't get recognized in the perl script and so the script just prints actual '\n' instead of carriage returning, otherwise everything gets... (3 Replies)
Discussion started by: stevensw
3 Replies

5. Shell Programming and Scripting

How to pass variable with spaces from shell to expect?

I need call expect script from shell script and pass values some of which could contain space. How to make expect to treat such values as one variable? (1 Reply)
Discussion started by: urello
1 Replies

6. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

7. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

8. Shell Programming and Scripting

Pass a variable string in To_Date Oracle function in shell script

Hello, I am trying to execute an SQL query from shell script. A part of script is something like this: fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"` $ORACLE_HOME/sqlplus -s /nolog <<EOD1 connect $COSDBUID/$COSDBPWD@$COSDBSID spool... (4 Replies)
Discussion started by: sanketpatel.86
4 Replies

9. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

10. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
firmdl3(1)							  brickOS Utility							firmdl3(1)

NAME
firmdl3 - A firmware downloader for the RCX. Version 3.0. SYNOPSIS
firmdl3 [options] srecfile DESCRIPTION
This manual page documents the firmdl3 kernel download command. firmdl3 is a program which is used to download the brickOS kernel (firmware). firmdl3 Supports single and quad rate downloading (quad-rate is default). Quad-rate downloading is a feature that significantly reduces firmware download times. It is implemented on top of a fast serial protocol that has a 2x baud rate with no complements or parity bits. The fast protocol is enabled by a short firmware stub that reconfigures some control registers and tweaks some ROM program state. Once the firmware stub is downloaded and executed, the ROM responds to the fast serial protocol, which the downloader then uses to transfer the actual firmware file. Because the initial firmware stub is small, all but the most trivial programs see a download time improvement when using quad-speed downloading. The caveat to using quad-speed downloading is its sensitivity to lighting conditions. Getting quad-speed downloading to work right might require some trial and error. In addition to avoiding harsh lighting conditions, it is important to place the RCX around 4-12 inches from the IR tower. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). The options supported by firmdl3 are: -h, --help Show built-in help (summery of options) -f, --fast Use 'fast' (4x) download algorithm (default) -s, --slow Use 'slow' (1x) download algorithm (Use if experiencing download problems) --tty={ttydevice} Specify serial serial tty where IR tower is connected. NOTE: The environment variable RCXTTY may be used in place of -tty --debug Enable debugging. (Mostly displays raw bytes). ENVIRONMENT VARIABLES
firmdl3 will respond to the environment variable RCXTTY. This should be set to the serial device to which the IR tower is connected. Use of RCXTTY is equivalent the using the -tty command-line option. EXAMPLES
firmdl3 is a simple command to use. The following examples show most of the uses. Ex1: download the brickOS kernal to ttyS0. $ firmdl3 -tty=/dev/ttyS0 /usr/lib/brickos/brickOS.srec Transferring "Fast Download Image" to RCX... 100% Transferring "/usr/lib/brickos/brickOS.srec" to RCX... 100% $ Ex2: download the brickOS kernal to ttyS1 (set env var 1st). $ export RCXTTY=/dev/ttyS1 $ firmdl3 /usr/lib/brickos/brickOS.srec Transferring "Fast Download Image" to RCX... 100% Transferring "/usr/lib/brickos/brickOS.srec" to RCX... 100% $ Ex3: download the brickOS kernal using slow protocol (assumes RCXTTY is already set). $ firmdl3 --slow /usr/lib/brickos/brickOS.srec Transferring "/usr/lib/brickos/brickOS.srec" to RCX... 100% $ NOTE: the missing indication of the "Fast Download Image" being sent. We'll leave the experiment of running firmdl3 with --debug set as an exercise for you our reader... (You really interested in seeing all the bytes fly by? ;-) ERROR MESSAGES
(excerpt from brickOS HOWTO) delete firmware failed Because of a limitation in the Lego firmware, firmdl3 cannot delete LegOS. Instead, before downloading the new firmware, you must first stop the old LegOS program, and then hold down the Prgm button while hitting the On/Off switch. This will delete the old LegOS firmware, allowing a new download. Alternately, if you see no green light on the IR box and get this error message, it may indicate you have a dead battery in the IR tower. /dev/ttyS0: Permission denied, com1: Permission denied, or a similar message. The first part of the error message is the output port that firmdl3 is trying to use. This can mean two things. Either you have specified the wrong device or you have specified the correct device but do not have permission to access it. If it is an access problem, speak to your sysadmin. If not, you can use the --tty argument to specify another device. For example, to specify the standard device under linux, try 'firmdl3 --tty /dev/ttyS0'. Under cygwin, you probably probably want to use 'firmdl3 --tty com1'. If you discover that this is the case, you may wish to recompile firmdl3 to make your setting the default. /dev/ttyS0: Input/output error or a similar message. You forgot to plug the tower in, most likely. unlock firmware failed This indicates that there was a slight corruption in the download. Clear brickOS and download it again. no response from RCX This error should be called "you forgot to turn on your RCX, moron." If I hadn't done it about 10 million times, I'd submit the patch to change the error myself. If firmdl3 gives you repeated problems, you may want to try using the --slow argument, which will make your download much slower but can correct for certain errors caused by ambient light. SEE ALSO
dll(1) AUTHOR
Laurent Demailly, Allen Martin, Markus Noga, Gavin Smyth, and Luis Villa all contributed something to some version of firmdl3. firmdl3 was written by: Kekoa Proudfoot <kekoa@graphics.stanford.edu> - 10/13/99 This manual page was written by Stephen M Moraco <stephen@debian.org>, for the Debian GNU/Linux system (but may be used by others). brickOS January 6, 2001 firmdl3(1)
All times are GMT -4. The time now is 12:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy