I have this script. (options is an array) It works fine. It responds fine to all items that are stored in the array. But when I press spacebar when I am asked for input. It will not give an error only run the function again. While I put : || [[ $i = " " ]] in the script to capture the space. What am I missing to avoid that only space is entered in the response or space[any characters]
Last edited by pludi; 08-29-2011 at 07:55 AM..
Reason: missed a =
I'm reading from a file that is semi-colon delimited. One of the fields contains 2 spaces separating the first and last name (4th field in - "JOHN<space><space> DOE"):
e.g. TORONTO;ONTARIO;1 YONGE STREET;JOHN DOE;CANADA
When I read this record and either echo/print to screen or write to... (4 Replies)
Hello
I am getting error when the file (Folder or Application) path having space is given as external input to the shell program.
It works fine for the files which has no spaces in the file name
Thans, (5 Replies)
Hi,
I can't deny the access to my server. if I visit http://localhost I can always see all the files.
Why ?
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Deny from All
</Directory>
<Directory "/Users/aneuryzma/Sites"> (4 Replies)
Hello,
Could someone explain why rlogin is allways allowed in my AIX 6.1 boxes, whatever user I use ?
According to documentation it should work only when .rhosts (or hosts.equiv) is properly set. But even these files do not exist - access is allowed.
If I use rsh(with specified command) it... (2 Replies)
Hi All,
From C++, I just want to find the address space size that a process is allowed to use. For ex, in 32 bit OS the allowed address space is 4GB and in 64 bit OS I guess this is 16GB or more.
I jsut want to find it in my C++ project. Is there any API calls that gives me such information.... (2 Replies)
HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is... (2 Replies)
Can you use the same vswitch for multiple HPVMs?
The reason I ask is because I created a vswitch and assigned it to one hpvm, and I was able to get it on the network. Then I created a second hpvm and used the same vswitch, and I am able to ssh/sftp TO the second hpvm, but I am unable to ping... (8 Replies)
Discussion started by: bstring
8 Replies
9. Post Here to Contact Site Administrators and Moderators
Hi,
I tried to post some perl code for discussion (wrapped in swaddling . However, a regex has an escaped backslash so the forum parser sees it as an URL?
Had the same experience with the sample data that I tried to provide for the same discussion. It contains emails addresses,... (1 Reply)
Hello,
Normally below script works, could you please comment out what could be the reason of failure if there are spaces in input filename:
script.sh
#!/bin/bash
cd /home/hts/.hts/tvh/
file="$1 $2 $3 $4"
read -d $'\x04' name < "$file"
/usr/bin/ffmpeg -i ""$name"" -vcodec copy -preset... (1 Reply)
Discussion started by: baris35
1 Replies
LEARN ABOUT DEBIAN
rdswap
RDSWAP(1) General Commands Manual RDSWAP(1)
["NAME"]
rdswap - a multi-language RD documents support tool
["SYNOPSIS"]
rdswap [ -h | -v ] filename ...
["DESCRIPTION"]
This tool is written to support you to write multi-language documents using the Ruby-Document-Format (RD).
The idea for such a tool was originated by Minero Aoki, how has thought about, how to make life easier for developers who have to write and
maintain scripts in more than one language.
You have to specify at least two filenames on the command line. One containing the Ruby script, the second containing a translated RD. If
the script does not end with `.rb', it has to be the first filename mentioned on the command line! In opposition, all files containing
translations must not ending with `.rb'! They should use a extension that describes the language. So that would give us the following pic-
ture:
o sample.rb : Script contains the original documentation.
o sample.jp : Documentation written in Japanese.
o sample.de : Translation to German.
The tool doesn't care about the language extensions. You can name them as you like! So the file containing the Japanese translation above,
could also be names e.g. `sample.japan' or even `japantranslation.japan'.
For every translation file, a new file will be created. The name is build from the script filename plus the language extension. So regard-
ing the example above, following files would be created:
o sample.rb.jp
o sample.rb.de
or, given the alternative translation filename as mentioned above...
o sample.rb.japan
["How does it work?"]
The contents of all files will be split into source and RD blocks. The source of the translation files, will be discarded! Every RD block
may be of a certain type. The type will be taken from the contents directly following the `=begin' on the same line. If there is only a
lonely `=begin' on a line by itself, the type of the block is `nil'. That means in
# File sample.rd
:
=begin
bla bla
=end
:
=begin whatever or not
blub blub
=end
:
the first block would be of type `nil' and the second one of type `whatever or not'.
Block types are important for the translation. If a source will be generated from a script and a translation file, only these blocks are
taken from the translation files, that comes in the right sequence and contains the same type as the block in the script! For example:
# File sample.rb
:
=begin gnark
Some comment
=end
:
=begin
block 2
=end
:
=begin
block 3
=end
:
# File sample.de
:
=begin
Block zwei
=end
:
=begin
Block drei
=end
:
Here, the first block of `sample.rb' will *not* be translated, as there is no translation block with that type in sample.de! So the first
block would be inserted as-it-is into the translated script. The blocks afterwards, however, are translated as the block type does match
(it is `nil' there).
Attention: In a translation file, a second block will only be used, if a first one was already used (matched). A third block will only be
used, if a second one was used already!
That means, if the first block of `sample.de' would be of type e.g. `Never match', then no block would ever be taken to replace anyone of
`sample.rb'.
["OPTIONS"]
["-h"]
shows this help text.
["-v"]
shows some more text during processing.
["filename"]
means a file, that contains RD and/or Ruby code.
["EXAMPLES"]
rdswap -v sample.rb sample.ja sample.de
rdswap -v sample.ja sample.rb sample.de
rdswap -v sample.ja sample.de sample.rb
rdswap -v sample.??
["AUTHORS"]
Clemens Hintze <c.hintze@gmx.net>.
June 2012 RDSWAP(1)