04-15-2012
How about adding a space before the second double quote?
This User Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script I am runing on a hacked CDLinux live CD called from /etc/rc.d/rc.local.
The part of th script in question goes like this.
When run from rc.local the prompt "Centre name :" and the colour change does not appear until after I type the input text and press return. Also, I... (2 Replies)
Discussion started by: simonb
2 Replies
2. Shell Programming and Scripting
Hi All,
I need to read filenames with space in between in a for loop
like
Integration of utility projects
Integration of hdf projects
I copied these files from a windows system and as you know windows filename has spaces in between them.
But while unix is reading the filename in a for... (12 Replies)
Discussion started by: dayanandra
12 Replies
3. Shell Programming and Scripting
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies
4. Solaris
Hi
I am using Solaris8.I want to find the total disk space of my server.Can anyone please tell that which field in below mentioned code signifies the disk space and whether this space is in Mb or GB.
c11t0d52 <EMC-SYMMETRIX-5264 cyl 4 alt 2 hd 15 sec 64>
... (4 Replies)
Discussion started by: sharmaankur85
4 Replies
5. Shell Programming and Scripting
Hi,
My Requirement is to read the filenames which possess space charatcer in it and pass the same file name to the other shell script as input parameter.
Please provide your valuable suggestion. (5 Replies)
Discussion started by: cnraja
5 Replies
6. UNIX for Dummies Questions & Answers
Could somebody please advise about how to configure pine/alpine so that on exit it doesn't prompt me to save read messages? Thanks (3 Replies)
Discussion started by: LeoKSimon
3 Replies
7. Shell Programming and Scripting
Below is a simple script to prompt for user input while suggesting an editable default value at the prompt:
shortname=user1
read -e -i $shortname -p "Please enter the username you would like to add: " input
USERNAME="${input:-$shortname}"
Please enter the username you would like to add:... (3 Replies)
Discussion started by: woodson2
3 Replies
8. Shell Programming and Scripting
A minor nitpick, but I cannot get a statement like:
read -s -n 1 -p "Say Y or N here" -e ANS
to actually hush the response. If I don't use the -p option, the response is silent. With it, I always see the response, and I've tried putting the -s in different spots. Is this a known issue, or... (2 Replies)
Discussion started by: jnojr
2 Replies
9. UNIX for Advanced & Expert Users
Hi All,
Please let me know how to read space between 2 words in script. It is reading only first chars ES,NZ. But after space it is not reading next 3 chars.
ES LPI
NZ GBL
FR LPI
DK LPI
for v_sob_cntry_cd in `cat /shared/set_of_books_cntry_cd_list.lst`
do
... (6 Replies)
Discussion started by: kiranparsha
6 Replies
10. Solaris
user1@:/$
-ksh: line 3: write to 1 failed
user11@:/$
-ksh: line 3: write to 1 failed
user1@:/$
-ksh: line 3: write to 1 failed
user1@:/$
-ksh: line 3: write to 1 failed
user1@:/$
-ksh: line 3: write to 1 failed But theres plenty of space :-
user1@:/$ df -kh
Filesystem ... (9 Replies)
Discussion started by: psychocandy
9 Replies
FLOOR(3M) FLOOR(3M)
NAME
fabs, floor, ceil, rint - absolute value, floor, ceiling, and round-to-nearest functions
SYNOPSIS
#include <math.h>
double floor(x)
double x;
double ceil(x)
double x;
double fabs(x)
double x;
double rint(x)
double x;
DESCRIPTION
Fabs returns the absolute value |x|.
Floor returns the largest integer no greater than x.
Ceil returns the smallest integer no less than x.
Rint returns the integer (represented as a double precision number) nearest x in the direction of the prevailing rounding mode.
NOTES
On a VAX, rint(x) is equivalent to adding half to the magnitude and then rounding towards zero.
In the default rounding mode, to nearest, on a machine that conforms to IEEE 754, rint(x) is the integer nearest x with the additional
stipulation that if |rint(x)-x|=1/2 then rint(x) is even. Other rounding modes can make rint act like floor, or like ceil, or round
towards zero.
Another way to obtain an integer near x is to declare (in C)
double x; int k; k = x;
Most C compilers round x towards 0 to get the integer k, but some do otherwise. If in doubt, use floor, ceil, or rint first, whichever you
intend. Also note that, if x is larger than k can accommodate, the value of k and the presence or absence of an integer overflow are hard
to predict.
SEE ALSO
abs(3), ieee(3M), math(3M)
4th Berkeley Distribution May 12, 1986 FLOOR(3M)