09-06-2016
Yes it was the typo, works well thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
'Morning
vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}'|read var
echo $var
This syntax run on AIX (ksh) but not on linux (bash).
I think that problem is the read command, because the following syntax is ok :
vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}'
Could someone help me!
regards... (16 Replies)
Discussion started by: nymus7
16 Replies
2. Shell Programming and Scripting
I have file which is space filled likE below
Note: here spaces are replaced by |.
When I use read command to read this file all the spaces are truncated only the default space is not removed. The output is
Note: here spaces are replaced by |.
Can this default truncation be override? (4 Replies)
Discussion started by: COD
4 Replies
3. Shell Programming and Scripting
Hi all,
What does -u option indicates in read command.
while read -u var1
do
.
.
done < file.txt (1 Reply)
Discussion started by: krishna_gnv
1 Replies
4. Shell Programming and Scripting
hi all
iam not able use read command in the while loop in the following program
while read line
do
echo $line
echo "enter name"
read name
echo "your have entered $name"
done < work.txt
THE READ COMMAND INSIDE THE WHILE LOOP IS NOT WORKING, IS ANY OTHER WAY TO SOLVE THIS... (7 Replies)
Discussion started by: avi.skynet
7 Replies
5. Shell Programming and Scripting
Is there a way to use the READ command and force the user to enter a non-zero length string? If the user enters a zero length string the user input is rejected.
code:
print "what is the answer: \n"
read answer (2 Replies)
Discussion started by: djehresmann
2 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone,
I have problem while writing a shell script for linux (Red Hat).
First I need to create a read command. I tried to google this but so far I can't sort this out. I hope you will be able to help me.
I have to read a file like this :
GESTION_DATA_SET_variable1_variable2
... (2 Replies)
Discussion started by: Aswex
2 Replies
7. UNIX for Dummies Questions & Answers
Hey, guys!
Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek:
So, I wanted to use a command statement similar to the following.
This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies
8. Shell Programming and Scripting
Hello guys,
I am trying to a script that reads from key board and use the entered value in the next step.
Example: enter folder name
read $folder (i will give work)
cd /main/$folder/
pwd
it should print /main/work
---------- Post updated at 03:31 PM ----------... (1 Reply)
Discussion started by: sharath24
1 Replies
9. Shell Programming and Scripting
Hi,
I am facing issues with the below:
I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,).
Now i want to read this command from file and execute it.
So my code below is :
Contents in the lookup.lkp file is :
c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies
10. UNIX for Beginners Questions & Answers
Is there a way to make the input of the read command (or some similar command that I'm unaware of) not visible, or with an astrix??
An example:
#!/bin/bash
# Example
echo; echo "Who are you??"; read name
if ;
then echo "Welcome, the terminal is yours."; exit
else "Stranger... (2 Replies)
Discussion started by: Huitzilopochtli
2 Replies
LEARN ABOUT PHP
mongoconnectionexception
MONGOCONNECTIONEXCEPTION(3) 1 MONGOCONNECTIONEXCEPTION(3)
The MongoConnectionException class
INTRODUCTION
Thrown when the driver fails to connect to the database.
There are a number of possible error messages to help you diagnose the connection problem. These are:
o No candidate servers found Thrown when the driver cannot establish a connection to MongoDB (fulfilling the ReadPreferences, if
specified).
o No server name given. This error occurs if you pass in "" as the server name, probably because of an typo with string interpola-
tion, e.g., "$servr" instead of "$server".
o
failed to get host [hostname] or port [portnum] from [server]. This indicated that the server string was malformed. "[hostname]"
and "[portnum]" will be as much as the driver could dicipher of it.
o Operation in progress Connecting to the database timed out.
o Transport endpoint is not connected Generally means that the connection string isn't correct, the driver couldn't even find the
database server.
o couldn't determine master No server in a replica set connection was identified as the primary.
o couldn't get host info for [server] This indicated that DNS could not resolve the server address you gave. This could easily be
caused by a typo, for example, "server" instead of "$server".
o Invalid Argument This can be caused by attempting to connect to a machine that is up but that the database isn't actually running
on. Make sure that you've started the database server before connecting.
o Permission denied This means that the socket could not be opened due to permissions issues. On Red Hat variants, this can be
caused by a default setting that does not allow Apache to create network connections. You can override this setting by running:
$ /usr/sbin/setsebool -P httpd_can_network_connect 1
If the error message is not listed above, it is probably an error from the C socket, and you can search the web for its usual cause.
CLASS SYNOPSIS
MongoConnectionException
MongoConnectionExceptionextends
MongoException
PHP Documentation Group MONGOCONNECTIONEXCEPTION(3)