I would like to prompt for input and then use it as a variable in a script.
Something like this.
#!/bin/ksh
echo "What is your name?: \c"
read response
echo "Your name is $reply" >file.txt
done
exit 0
What am I missing?
Thanks, (7 Replies)
Please Help!!
Here is a very simplistic example of what I am trying to accomplish.
I need what I have inbetween the quotes to be read into the shell variable.
x="This is fun"
echo $x
The results of x from the above expression is:
This is fun
Notice the unix takes out the... (1 Reply)
Hi!
1. I have a parameter file containing path to log files. For this example both paths are the same, one is stated directly and the second using env variables.
/oracle/admin/orcl/bdump/:atlas:trc:N
${ORACLE_BASE}/admin/${ORACLE_SID}/bdump/:${ORACLE_SID}:trc:N
2. I try to parse the path... (1 Reply)
hi,
I am using a shell script from where i will be conecting to sqlplus..
i am having a problem in passing a variable to sqlplus query..
i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Hi All,
I am using SunSolaris machine.
I need to get the value of environment variable from awk begin. Then use that value as the start number of a sequence and use that in my print statement. But it is not reading the value from environment variable.
I have tried the following:
... (5 Replies)
Hi,
I am using #!/bin/sh shell. I have a variable which contains multi line data. I want to read that variable line by line. Can someone post the code to read the multi line variable line by line?
Any help is much appreciated. (2 Replies)
Hi,
In shell script, I have a variable var = xyz, inn, day, night, calif ....n and I would like to read them in to var1 = xzy, var2 = inn, var3= day, var4 = night....var.
probably in a loop. I would like to read the variables until end of the line. Comma is the delimiter and there's no comma at... (3 Replies)
Hi All,
I'm writing a script to read a file line by line and then perform awk function on it. I am getting an error . My file has one name in it "James". I'm expecting my o/p to be youareJamesbond
James
./users.sh: line 7: =: command not found
#script to read file line by line
#adding... (5 Replies)
Hi,
I have an inputfile with some table names in it.
For ex:
t_arnge
t_profl
t_fac
I need a script which reads the line one by one and need to assign to some dynamic variable. If to explain the above example:
i need some
a=table_name1
table_name1=t_arnge in first time and... (4 Replies)
I have a file abc.ini and declared many variables in that file, one of the variable(DBname) value I am trying to read in my perl script but getting error.
File abc.ini content
# database name
DBname =UATBOX
my $ex_stat;
my $cmd_output;
$ex_stat = "\Qawk '/^DBname/{print... (2 Replies)
Discussion started by: Devesh5683
2 Replies
LEARN ABOUT DEBIAN
cdbmake
cdbmake(1) General Commands Manual cdbmake(1)NAME
cdbmake - create a constant database
SYNOPSIS
cdbmake cdb cdb.tmp
DESCRIPTION
cdbmake reads a series of encoded records from its standard input and writes a constant database to cdb.
cdbmake ensures that cdb is updated atomically, so programs reading cdb never have to wait for cdbmake to finish. It does this by first
writing the database to cdb.tmp and then moving cdb.tmp on top of cdb. If cdb.tmp already exists, it is destroyed. The directories con-
taining cdb.tmp and cdb must be writable to cdbmake; they must also be on the same filesystem.
cdbmake always makes sure that cdb.tmp is safely written to disk before it replaces cdb. If the input is in a bad format or if cdbmake has
any trouble writing cdb.tmp to disk, cdbmake complains and leaves cdb alone.
RECORD FORMAT
Records are indexed by keys. A key is a string. cdb is structured so that another program, starting from a key, can quickly find the rel-
evant record. cdbmake allows several records with the same key, although most readers take only the first record, and cdbmake slows down
somewhat if there are many records with the same key.
cdbmake and cdbdump(1) preserve the order of records.
A record is encoded for cdbmake as +klen,dlen:key->data followed by a newline. Here klen is the number of bytes in key and dlen is the
number of bytes in data. The end of data is indicated by an extra newline. For example:
+3,5:one->Hello
+3,7:two->Goodbye
key and data may contain any characters, including colons, dashes, newlines, and nulls.
Keys and data do not have to fit into memory. A database cannot exceed 4 gigabytes.
cdb is portable across machines.
SEE ALSO cdbdump(1), cdbget(1), cdbstats(1)cdbmake(1)