Search Results

Search: Posts Made By: rituparna_gupta
7,296
Posted By rituparna_gupta
Hi Just Ice, Even redirecting it to a file...
Hi Just Ice,

Even redirecting it to a file doesnt seem to wrk:
1. exit/echo fails with the same error
2. trying to print the output into the files using select statement doesnt work either, as...
7,296
Posted By rituparna_gupta
Hi MadeInGermany/Don, Tried the suggested...
Hi MadeInGermany/Don,

Tried the suggested workaround, but getting this error on trying both echo 1 or exit 1 :


ORA-06550: line 21, column 6: PLS-00103: Encountered the symbol "1" when...
7,296
Posted By rituparna_gupta
Return value to shell script, depending on status of pl/sql udpate
Hi All,

I need to return value to the main shell script, depending on whether the UPDATE command in the embedded pl/sql is successfu or not.



#!bin/ksh

updateStatus=`sqlplus --conn...
4,226
Posted By rituparna_gupta
This one works: while read line ...
This one works:

while read line
do
if [ "$Name" = "$line" ]
then
tempvar=`expr $tempvar + 1`
echo...
4,226
Posted By rituparna_gupta
Hi Yoda, I have finally been able to solve...
Hi Yoda,

I have finally been able to solve it :), by using below code...
And yes I was calling this function from the mail script. Regarding the echo 0 part, yes I had added it later on, just to...
4,226
Posted By rituparna_gupta
Did that , but the values gets set properly...
Did that , but the values gets set properly inside the loop, but gets reset once its outside :(

+ echo Please enter the name:
Please enter the name:
+ read name
ritu
tempvar=0
+ read line...
4,226
Posted By rituparna_gupta
Hi Yoda, I would have to use Korn Shell, as...
Hi Yoda,

I would have to use Korn Shell, as am using some other symtax in rest of the code which is not compatible with bash
I tried the once you have mentioned above, but its not working...
4,226
Posted By rituparna_gupta
Issue with accessing value inside while loop, outside it
Hi,


GetName()
{
if [ $abc != "SO" ]
then
echo " Please enter the name: "
read Name
tempvar=0
while read line
do
if [ "$Name" =...
6,419
Posted By rituparna_gupta
It worked... Thanks !!
It worked... Thanks !!
6,419
Posted By rituparna_gupta
Grep to display file name along with content in Solaris
Am using the following grep to match a particular patter in grep.
grep xyz abc.txt
now while i run this command, if the pattern matched, am getting the line containing xyz
Output: xyz is doing...
1,217
Posted By rituparna_gupta
It worked!!! - Yes I was using Solaris.... ...
It worked!!! - Yes I was using Solaris....
Thanks a ton :)
1,217
Posted By rituparna_gupta
Same issue with these 2 as well :( $...
Same issue with these 2 as well :(


$ var3=$(awk '$1 ~ "'$var1'" { print $2 }' abc.txt)
awk: syntax error near line 1
awk: bailing out near line 1


$ var3=$(awk '$1 ~ d { print $2 }'...
1,217
Posted By rituparna_gupta
Use Variable in
Hi,

I need to pass a variable in the search string of awk.
I have tried different forms, but the awk -v option does not work on my Unix version.

This is what i need (Example) :

var=GHI...
12,523
Posted By rituparna_gupta
It worked - Thanks Chubler_XL :b:
It worked - Thanks Chubler_XL :b:
12,523
Posted By rituparna_gupta
Thanks Alister... Is there any way this can...
Thanks Alister...

Is there any way this can be overcome - so that I can have variable in the file referenced directly
12,523
Posted By rituparna_gupta
Replace value of a variable in a file through script using sed
Hi,

I am trying to replace the value of a variable in a file through another script.

Example:
Filename : abc.txt contents:
a=10
b=20
c=30

Need to change the value of, say, b - Tried...
2,670
Posted By rituparna_gupta
Thanks methyl - The solution worked out perfectly...
Thanks methyl - The solution worked out perfectly :)

1 more question ---- Is there any option to find out the reverse as well - to find files which are there in the directory for more than 5...
2,670
Posted By rituparna_gupta
$ uname -a SunOS XXXX 5.10 Generic_147440-13...
$ uname -a
SunOS XXXX 5.10 Generic_147440-13 sun4v sparc SUNW,T5440

$ echo "${SHELL}"
/bin/ksh

No, I have only limited privileges to the server - can't login as root
2,670
Posted By rituparna_gupta
I am using ksh
I am using ksh
2,670
Posted By rituparna_gupta
Find out whether directory has been updated with files in the last 5 minutes or not
Hi,

I am trying to work on this script that needs to monitor a Directory.
In case there are no files received in that Directory for the last 5 minutes, it has to send out an alert.

Could...
1,754
Posted By rituparna_gupta
Oops - sorry - i missed the last / there & so it...
Oops - sorry - i missed the last / there & so it was not working.
Now its working fine :)

But there is 1 more issue - only the output displayed on running the script have the required changes....
1,754
Posted By rituparna_gupta
while running this : sed -i "s/^#$str/$str/"...
while running this : sed -i "s/^#$str/$str/" *.txt
m getting this error : sed: illegal option -- i

& if i try : sed "s/^#$str/$str/" *.txt
i get : sed: command garbled: s/^#ritu/ritu

& if i...
1,754
Posted By rituparna_gupta
Thanks a lot guruprasadpr, for the swift reply. ...
Thanks a lot guruprasadpr, for the swift reply.

But I forgot to mention 1 thing :( - Sorry for the inconvenience
I need the # to be removed from lines which matches another string.

Lets...
1,754
Posted By rituparna_gupta
Script to search for a character in files in a Directory & remove it
Hi All,

Am new to both Unix & this Forum - Need some help on a script that I am trying to write:

In a Directory i have few text files which might or might not contain some text that I am...
Showing results 1 to 24 of 24

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