Search Results

Search: Posts Made By: gctex
2,581
Posted By gctex
That worked just fine! Thanks :b: ...
That worked just fine!

Thanks :b:

---------- Post updated at 04:11 PM ---------- Previous update was at 04:10 PM ----------



That also worked just fine!

Thanks :b:
2,581
Posted By gctex
Yeah, it works, thanks! :b: I noticed that...
Yeah, it works, thanks! :b:

I noticed that some of my files have owner prefix for tables like this:


-- Configure test table connections ---
table10 owner.table_name_10 table10...
2,581
Posted By gctex
Here are the contents of my file: cat -vet...
Here are the contents of my file:

cat -vet temp.lst


-- Configure test table connections ---$
$
table10 table_name_10 table10 table_name_10$
table20 table_name_20 table20 table_name_20$...
2,581
Posted By gctex
Thanks, same issue. It replaces all words in the...
Thanks, same issue. It replaces all words in the last columns on all lines (irrespective of whether there is the word "table_name" in those lines).

---------- Post updated at 02:28 PM ----------...
2,581
Posted By gctex
It replaces all words in the last columns of all...
It replaces all words in the last columns of all lines when there is no word "table_name" in those lines.
2,581
Posted By gctex
I tried something like '%s/\(.*[...
I tried something like '%s/\(.*[ ]\)\(.*\)/\1test_\2/'

It doesn't work.
2,581
Posted By gctex
That will replace first occurrences of...
That will replace first occurrences of "table_name". I don't want to touch the second column (first occurrence). Only change the values in the last column (second occurrence).

---------- Post...
2,581
Posted By gctex
[Solved] Replace the second pattern alone in VI.
I have lines like:

table10 table_name_10 table10 table_name_10
table20 table_name_20 table20 table_name_20
table30 table_name_30 table30 table_name_30


I want to change the second...
2,861
Posted By gctex
Figured it out, added a redirect at the end and...
Figured it out, added a redirect at the end and it works just fine now!.

Thanks once again Scrutinizer, appreciate the prompt responses.
2,861
Posted By gctex
Thanks, almost there ... it lists the files on...
Thanks, almost there ... it lists the files on screen. I need them saved to a file, so that they can be executed as a script.

Something like:

ls create_*.txt > create_master.txt
2,861
Posted By gctex
Works beautifully well !... :b: Thanks,...
Works beautifully well !... :b: Thanks, Scrutinizer.

How can I get all the new files created (create_*.txt) in a list?
2,861
Posted By gctex
Thanks, Scrutinizer. But I am getting this error...
Thanks, Scrutinizer. But I am getting this error when running it:

awk: syntax error near line 6
awk: illegal statement near line 6
awk: syntax error near line 14
awk: illegal statement near...
2,861
Posted By gctex
Replace values in a file with values from another file
Hi,

I have 2 input files:

File 1:

echo Name > create_Name.txt
echo Group /dir/group, Name >> create_Name.txt

File 2:

Name AAA BBB CCC
group A B C
dir A1 B1 C1...
3,070
Posted By gctex
T1 is a sub branch of T4 just like T3. So it...
T1 is a sub branch of T4 just like T3. So it needs to appear along with T3. So final sort has to be this way:


T5 | 1
T4 | 2
T1 | 3
T3 ...
3,070
Posted By gctex
Not sure, this is what I am getting: !....
Not sure, this is what I am getting:


!. srt1.sh
T1 | 1
T5 | 1
T4 | 2
T1 | 3
T3 | 3
T4 | ...
3,070
Posted By gctex
Thanks, it works, but it prints this way : ...
Thanks, it works, but it prints this way :

T1 | 3
T2 | 1
T3 | 3
T4 | 2
T5 | 1

Can we print it without altering the original sort order?

Also, the first column, with values greater...
3,070
Posted By gctex
Removing duplicates
I have a test file with the following 2 columns:

Col 1 | Col 2
T1 | 1 <= remove
T5 | 1
T4 | 2
T1 | 3
T3 ...
13,984
Posted By gctex
Yeah Chubler, something in our envirorment does...
Yeah Chubler, something in our envirorment does behave weird. If I replace "ps -ef" with "jobs" it just doesn't go beyond the first 6 sqls. Anyways, "ps -ef" works fine for me, occasional bad number...
13,984
Posted By gctex
Oh ok, got it about || ... forgot about it ... :)...
Oh ok, got it about || ... forgot about it ... :)

For me "ps -ef|grep "sqlplus -s"|grep -v grep|wc -l" is showing the number of sessions running correctly. It shows 6 processes or less when the...
13,984
Posted By gctex
@Chubler, you are right, I was trying to find the...
@Chubler, you are right, I was trying to find the number of sql processes running and assigning that to cnt variable. Here's the code:

while read sql
do

stuff "sqlplus"

let...
13,984
Posted By gctex
@chubler, is there a quick way to trap "ksh:...
@chubler, is there a quick way to trap "ksh: cnt=: bad number" errors?

My code is working just fine, just a couple of places it throws this bad number error, I need to see what value is being...
13,984
Posted By gctex
Thanks Chubler for the code. I ran it a couple of...
Thanks Chubler for the code. I ran it a couple of times and I got the same issue. Hits a long running sql script and ignores the others.

This is the output I was getting:

NUM= 0
[1] ...
13,984
Posted By gctex
methyl, you are absolutely wrong about this: "A...
methyl, you are absolutely wrong about this: "A sequence of commands written in sqlplus is called a program."

There were always sql scripts and always will be. A set of sql commands run through...
13,984
Posted By gctex
Wow, that was a super fast response! thank you...
Wow, that was a super fast response! thank you ...

System is SunOS 5.10 Generic_144488-06, shell is ksh.

Yeah, I tried with "wait" before but I found that since "wait" waits for the...
13,984
Posted By gctex
Running jobs in parallel
I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of...
Showing results 1 to 25 of 25

 
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy