08-25-2010
Quote:
Originally Posted by
pileofrogs
You got single quotes (') around the sed command. You need to use double quotes (") for $NUMBER to get processed by bash.
normally single quotes works but double quotes worked in this case, thnx
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have to query a DB2 database, and sometimes they take a long time to produce results. Can I run these queries in the background, and if so, where will the results appear? (1 Reply)
Discussion started by: jpprial
1 Replies
2. UNIX for Dummies Questions & Answers
Can anyone help..
I have a .dat file which contains 5 columns of data. I need to select one row containing just 3 of the columns. I'm not sure how to select a single row? I then need perform arithmetic on on two out of the three columns and display the output in a new column.
For example..
... (1 Reply)
Discussion started by: computersaysno
1 Replies
3. Shell Programming and Scripting
Hi,
I new to Unix and scripting. Following is my requirement. Can someone tell me whether its possible or not. Also please let me know how to proceed further if this is possible.
List of queries are stored in a file. For example, I have to run a query like this:
Select * from &XYZ where... (0 Replies)
Discussion started by: simhasuri
0 Replies
4. Shell Programming and Scripting
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies
5. Shell Programming and Scripting
My file is now cleaned, sanitized & prepped:
07/07/2008 21:18:51 Installation 52016 complete *BUT NOTHING CHANGED*
07/21/2008 15:28:15 Removal 52016 complete
07/21/2008 15:34:15 Removal 55856 complete
12/08/2009 19:30:40 Installation 62323 complete
12/08/2009 19:39:06 Installation ... (6 Replies)
Discussion started by: dba_frog
6 Replies
6. Programming
dear all,
i want to insert string in file to mysql i just want how to do that cause i am poor in sql languages ...
so this file like this
DATA.txt
doni|student|westjava|123412|lombok|
iwan|student|westjava|1234412|utankayu|
rio|student|westjava|12342|cempedak|
so i want insert DATA.txt to... (2 Replies)
Discussion started by: zvtral
2 Replies
7. Shell Programming and Scripting
Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies
8. Shell Programming and Scripting
Hi All,
I have a file queries.txt as follows :
SELECT COLUMN1 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN1 FROM SCDEMA2.TABLE2;
SELECT COLUMN2 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN2 FROM SCDEMA2.TABLE2;
SELECT COLUMN3 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN3 FROM SCDEMA2.TABLE2;
SELECT... (2 Replies)
Discussion started by: SriRamKrish
2 Replies
9. Programming
Dear community,
could someone help me to join 2 queries into one?
Basically it's the same query with different clauses (please notice the FIELD3 filters and related counters into the subquery):
SELECT A.FIELD1,A.FIELD2,A.FIELD3
FROM
TABLE A
INNER JOIN
(
SELECT FIELD1,... (3 Replies)
Discussion started by: Lord Spectre
3 Replies
10. 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
dp(8) System Manager's Manual dp(8)
NAME
dp - parse dates RFC 822-style
SYNOPSIS
/usr/lib/mh/dp [-form file] [-format string] [-help] [-width columns] dates
OPTIONS
Overrides the default output format of dp. The output is formatted according to the instructions in the specified file. This must be a
format file; see mh-format(4). Overrides the default output format of dp. The output is formatted according to the instructions in the
specified string. This must be a format string; see mh-format(4).
The argument to the -format option must be interpreted as a single token by the shell that invokes dp. Therefore, you should usually
place the argument to this option inside double quotes ("). Prints a list of the valid options to this command. Specifies the
width of the screen in columns.
The defaults for this command are as follows:
-width defaults to the width of the terminal
DESCRIPTION
The dp command parses dates according to the ARPA Internet standard. It also understands many non-standard formats, such as those produced
by TOPS-20 sites and some UNIX sites using ctime(3). It is useful for seeing how MH will interpret a date.
The dp program treats each argument as a single date, and prints the date out in the official RFC 822 format. Hence, it is usually best to
enclose each argument in double quotes (") for the shell.
EXAMPLES
This is the default format string used by dp:
%<(nodate{text})error: %{text}%|%(pretty{text})%>
When an error is detected, this prints error: and the date that is in error. Otherwise, it outputs the proper RFC 822 format of the date.
FILES
User profile.
SEE ALSO
Commands: ap(8)
Standard for the Format of ARPA Internet Text Messages (RFC 822)
dp(8)