10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (1 Reply)
Discussion started by: Sathyapts
1 Replies
2. Shell Programming and Scripting
RHEL 6.2/Bash shell
root user will be executing the below script. It switches to oracle user logs in using sqlplus and tries to
run the below UPDATE statement. All the commands after su -c are enclosed in a single quote delimited by semicolon.
The execution has failed because the quotes... (3 Replies)
Discussion started by: omega3
3 Replies
3. Shell Programming and Scripting
Hi, consider a file which has data such as
"random text",912345,"54","finish"
"random text",9991236745,"9954","finish"
I want to replace the numbers that don't have double quotes around them with ones that do; so the output should be
"random text","912345","54","finish"
"random... (4 Replies)
Discussion started by: Storms
4 Replies
4. Programming
Dear Mates,
I am trying to write a macro to replace with its arguments with singles quotes around each argument.
#define DECR(a,b,c,d,e) decr('a','b','c','d','e')
if the usage is
DECR(k,e,y,s,\0)
I want it to be replaced with the following
decr('k','e','y','s','\0')
However it... (2 Replies)
Discussion started by: tamil.pamaran
2 Replies
5. Programming
Hi Guys,
Can someone please help me on adding/inserting a variable to an sql scipt? Basically I want to assign today's date. As shown below..
set head off;
set linesize 300;
set pagesize 200;
spool /opt/oracle/temp/output.txt
select value,count(*) as totalcount from pmowner.pinpebasev... (11 Replies)
Discussion started by: pinpe
11 Replies
6. Shell Programming and Scripting
Hi.
please help me to write the following query in a shell script.
the Query is :select no,salary from emp_info where name='$var_name'
the following is my code.
#! /bin/sh
var_name=$1
sqlplus -s user/pwd@DB << EOF
select no,salary from emp_info where name="'$var_name'";... (4 Replies)
Discussion started by: little_wonder
4 Replies
7. Shell Programming and Scripting
i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Discussion started by: sw@pnil
1 Replies
8. Shell Programming and Scripting
Hi,
I ahve a file where the format is as given below:
qqq dfsf gdfjkg gjdosjg jkflsjd 21
fdksdlf fsdnkfl lkdfsgjld 45
laefsdl fsdlfksl fsdklflk gfsdl 56
I need to replace the last number by space or delete the last number in each line. (by using... (6 Replies)
Discussion started by: jisha
6 Replies
9. Shell Programming and Scripting
Hi
I have a text file which has two sets of lines repeating for "n" number of times.Some data is printed between the two lines.I want to retrieve all the data thats there in between those two set of lines.I have the string value of those two set of lines.
To be much more clearer
... (4 Replies)
Discussion started by: chennaitomcruis
4 Replies
10. Shell Programming and Scripting
Hi,
I have a file which looks like this, I have stripped most of the columns:
2006,UCA,"02452","NM","1","M","84",123,aa
2006,UCA,"02452","NM","1","L","84",123,bb
2006,UCA,"02452","NM","1","L","84",432,cc
2006,UCA,"02452","NM","1","L","33",213,dd
2006,UCA,"02452","NM","1","L","33",124,ee... (3 Replies)
Discussion started by: sumeet
3 Replies