Search Results

Search: Posts Made By: Vaddadi
2,657
Posted By Vaddadi
Am I doing something wrong , it's not removing...
Am I doing something wrong , it's not removing the last occurance of "UNION ALL" . lets think about only removing the last occurance of "UNION ALL"

Code is:

#! /usr/bin/ksh
. ~/.profile
...
2,657
Posted By Vaddadi
Thanks .. anythig using sed or awk commands or...
Thanks .. anythig using sed or awk commands or any native unix commands.
2,657
Posted By Vaddadi
Removing last occurance of string in text
I have text file as follows and would like to remove the last occurance of "UNION ALL" string and replace @@ with single quote (').

Input text in file is

with temp as (
( select -----------...
21,947
Posted By Vaddadi
Thanks .. I could able to do it.. So much of good...
Thanks .. I could able to do it.. So much of good information .. keep sharing..
21,947
Posted By Vaddadi
I was looking for the similar kind of example...
I was looking for the similar kind of example without any attachments. How do I go with this on AIX.

I removed the related ATTACH code and also tried with
uuencode --base64
(and )
uuencode...
8,656
Posted By Vaddadi
Thanks it worked like a champ ..
Thanks it worked like a champ ..
8,656
Posted By Vaddadi
I was having some header line in the file so I...
I was having some header line in the file so I wanted to skip them..

Anyway.. I removed the header and then your instruction worked like champ..

Can we merge find | cat | awk command in...
8,656
Posted By Vaddadi
Sum of file size in directory / subdirectory
Hi ,

I am trying to write something to find the size of particular type of files in a directory & it's subdirectory and sum the size .. These types of file are found at directory level or its...
Forum: AIX 04-20-2010
16,462
Posted By Vaddadi
Thanks to all ... it worked like a champ. ...
Thanks to all ... it worked like a champ.

Shyam
Forum: AIX 04-19-2010
16,462
Posted By Vaddadi
Thanks ... tried set -f & set +f , but it...
Thanks ... tried set -f & set +f , but it didn't work ..
Forum: AIX 04-19-2010
16,462
Posted By Vaddadi
Replace string with asterisk(*) in variable
I was trying to replace a string ( for eg - @@asterisk@@ to * ) in variable using


cat $INFILE | while read LINE
do
stmt1=`echo $LINE | sed 's/@@asterisk@@/\*/g'`
stmt=$stmt' '$stmt1...
5,254
Posted By Vaddadi
Thanks for the solution .. i am close but few...
Thanks for the solution .. i am close but few more thingsg..

it is putting comma for every space in the result " see INSERT,INTO,schema.table,VALUES,(" and " 0,);commit ;"

Code
-------...
5,254
Posted By Vaddadi
Appending string, variable to file at the start and string at end
Hi ,

I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable...
1,957
Posted By Vaddadi
I did this in a simple way using the SPLIT...
I did this in a simple way using the SPLIT command..

third=`echo "scale=0; $tfile_len1 / 3" | bc`
split -l $third $TEMPDIR/file_wo_tail.out $TEMPDIR/run

This created 3 files as runaa, runab...
1,957
Posted By Vaddadi
If I hardcode the values for $one_third &...
If I hardcode the values for $one_third & $two_third variable .. I am getting what I want ..

So how can I have the variable in AWK cmd..
1,957
Posted By Vaddadi
Need help in splitting the file
Hi,

I got a file which may have 100 - 500 rows with header and trailer... based on the total number of real rows ( excluding header and trailer) I want to break the file in 3 or 4 files ..
...
3,315
Posted By Vaddadi
Thanks ... I realise that I missed...$
Thanks ... I realise that I missed...$
3,315
Posted By Vaddadi
Reading file and assigning that to Variable
I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it...
13,246
Posted By Vaddadi
What about if you need to extract the lines based...
What about if you need to extract the lines based on 5th charater in first word.
12,814
Posted By Vaddadi
I did it .. Here is the code ...
I did it ..

Here is the code
-----------------------------------------------------------------
#!/bin/ksh
#========================================================
count_args() # Returns...
12,814
Posted By Vaddadi
for loop with db2 command
Having some trouble with usage of for loop and displaying words. Basically I had 3 words( some times more )
in the variable. I want to get one at a time to process.

I am new to unix scripting so...
Showing results 1 to 21 of 21

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