10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
2. Shell Programming and Scripting
I have a sql statement , i need to assign to a variable in Unix
sel count(*) AS num_files from TABLE_A;
i need to use "num_files" in unix statements. let me know how to assign unix variable to above num_files (1 Reply)
Discussion started by: nani1984
1 Replies
3. Shell Programming and Scripting
Hi,
How can I redirect the output of a following command to a variable.
ftp myservername
ftp> user
(username) guptaji
331 Password required for guptaji.
Password:
ftp> size /home/salil/abc.dat
ftp> a='size /home/salil/abc.dat'
?Invalid command
I want to redirect value of size to... (1 Reply)
Discussion started by: Salil Gupta
1 Replies
4. Shell Programming and Scripting
I'm trying to redirect the output of crontab to a variable named "crontab_status" as below:
crontab_status=$(crontab -l)
executing the script is not redirecting to the variable. Please help! (6 Replies)
Discussion started by: mjavalkar
6 Replies
5. Shell Programming and Scripting
i have to do a check in my UNIX script to see whats saved in the database. depending on whats there will fork data to certain functions. However i do not know how to capture SQL output into a UNIX variable.
Below is what i have tried, but i get an error:
Error 3706 Failure 3706 Syntax error:... (3 Replies)
Discussion started by: purplebirky
3 Replies
6. Shell Programming and Scripting
Hi,
I need to get the value from the table using the sql command and store this value into the unix variable so that i can use this value for furthure use..
Please can any body help me in this regards
Thanks & Regards
Abdul Hafeez Shaik (17 Replies)
Discussion started by: abdulhafeez
17 Replies
7. Shell Programming and Scripting
i want to redirect the grep output into the variable
but i am not able to get it
i tried
veri=`grep -i $1 "${logdir}"* | grep -i adding | grep -iv equation | tail -1 | cut -d ':' -f 1`
vari=$(grep -i $1 "${logdir}"* | grep -i adding | grep -iv equation | tail -1 | cut -d ':' -f 1)
BUT NOT... (1 Reply)
Discussion started by: mail2sant
1 Replies
8. Shell Programming and Scripting
I'm trying to redirect awk's output to a BASH variable. Currently the statement looks like this
options=`awk '{ while (i < NF) { print $i; ++i } }' answer
but for some reason that makes $options look like this:
1 2 3 4
1
2
3
Now, the input file 'answer' is taken from a dialog... (3 Replies)
Discussion started by: dhinge
3 Replies
9. UNIX for Dummies Questions & Answers
how make assign the output of the command (for example: grep "file" "string" ) in a variable ($name)?
i thing how put the result of the command (grep , cut, find ecc) in a variable..
IT's Possible ?? (1 Reply)
Discussion started by: ZINGARO
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am looking for a way to redirect the result from a command into a variable.
This is the scenario.
Using the find command I will be getting multiple records/lines back.
Here is the command I am using:
find /”path”/ -name nohup.out -print
This now is giving me the paths and file... (1 Reply)
Discussion started by: hugow
1 Replies
AMDD(8) System Manager's Manual AMDD(8)
NAME
amdd - Amanda version of dd
SYNOPSIS
amdd [ -d ] [ if=input ] [ of=output ] [ bs=blocksize ] [ skip=count ] [ count=count ]
DESCRIPTION
Amdd provides just enough of the standard dd command for the needs of Amanda. This is handy when doing a full restore and the standard dd
program has not yet been found.
Amdd also provides access to the Amanda output drivers that support various tape simulations. This may be used for debugging or to convert
from one format to another.
See the amanda(8) man page for more details about Amanda. See the OUTPUT DRIVERS section of amanda(8) for more information on the Amanda
output drivers.
OPTIONS
-d Turn on debugging output.
-llength
Set the output length. If the output driver limits the output size, this controls when end of tape will be simulated.
Length may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
if=input
Input to dd. Default is stdin.
of=output
Where to send the output of dd. Default is stdout.
bs=blocksize
Size of each record. Input records smaller than this will not be padded. Output records will be the same size as the corresponding
input record. Default is 512 bytes.
Blocksize may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
count=count
Number of records to copy. Default is all records until end of file.
skip=count
Number of records to skip before copying input to output. Default is zero.
AUTHOR
Marc Mengel <mengel@fnal.gov>
John R. Jackson <jrj@purdue.edu>
SEE ALSO
amanda(8)
AMDD(8)