Search Results

Search: Posts Made By: shashi_kiran_v
3,076
Posted By shashi_kiran_v
Did a work around by creating a flag file and...
Did a work around by creating a flag file and then checking for its existence in the main script to exit completely.
3,076
Posted By shashi_kiran_v
But is there any way I can totally come out of...
But is there any way I can totally come out of the main script.
This exit is only coming out of the function and the loop in which the main shell script was calling the function.

I need to stop...
3,076
Posted By shashi_kiran_v
Thanks a lot ranj!! It worked.
Thanks a lot ranj!! It worked.
3,076
Posted By shashi_kiran_v
Shell script problem
Hi,

I have a shell script in which I am calling a function from a different shell script. This functions executes the SQL and the results are stored in a log file.

If the result of the SQL is...
5,346
Posted By shashi_kiran_v
It can be done by the following command. Is there...
It can be done by the following command. Is there much simpler and faster?

cat test | sed -e "s/[ ]*^[ ]*/^/g" | sed -e "s/\.^/^/g" > test.new

Thanks
5,346
Posted By shashi_kiran_v
Hi Vino, Can you also please help me in...
Hi Vino,

Can you also please help me in eliminating the dot as well using ur simpler sed command.

From

0EI0LAFV^0EI0L46V^.^2^7^.^40000^J^.^.^.^

To

0EI0LAFV^0EI0L46V^^2^7^^40000^J^^^
...
5,346
Posted By shashi_kiran_v
My mistake... Thanks a lot Vino...
My mistake...

Thanks a lot Vino...
5,346
Posted By shashi_kiran_v
Thanks for the reply Vino... But that sed...
Thanks for the reply Vino...

But that sed command is not able to produce the ouput.
5,346
Posted By shashi_kiran_v
I was able to come over this problem by using the...
I was able to come over this problem by using the following sed command

sed -e 's/ *$/ /g' instead of sed -e 's/ *$//g'

But I don't understand the need of space between the forward slashes.
...
5,346
Posted By shashi_kiran_v
Sed command not working
Hi,

I have a test file as follows:

1G102119 ^ AA1179291 ^ 06oct2006 09:50:35^ 73.4^ 2^ 13^ 0^ 1493
1G102119 ^ AA1179291 ^ 06oct2006 09:49:45^ 73.4^ 2^ 13^ 0^ ...
3,292
Posted By shashi_kiran_v
FTP - remote access
Hi All,

I want to ftp a file from Windows 2000 to Unix. The file is present in a remote server which has been mapped to one of my drives. I am not able to connect to that directory.

I am...
2,239
Posted By shashi_kiran_v
Thanks a lot vgersh99!. It worked. I think when I...
Thanks a lot vgersh99!. It worked. I think when I searched the forum it was your answer which I took at the first time. You are a genius.

Thanks
Shash
2,239
Posted By shashi_kiran_v
Match & append the files
Hi All,

I have a problem in appending the files

File 1
0.0000001 0.500000039894
0.0000002 0.500000079788
0.0000003 0.500000119683
0.0000004 0.500000159577
0.0000005 0.500000199471...
5,813
Posted By shashi_kiran_v
Got it... awk '$1 !~ /"0"/' inputfile >...
Got it...

awk '$1 !~ /"0"/' inputfile > outputfile
5,813
Posted By shashi_kiran_v
Select records based on search criteria on first column
Hi All,

I need to select only those records having a non zero record in the first column of a comma delimited file.

Suppose my input file is having data like:

"0","01/08/2005...
2,866
Posted By shashi_kiran_v
Thanks I got the info... Thanks Shash
Thanks I got the info...

Thanks
Shash
2,866
Posted By shashi_kiran_v
Eliminate blank lines...
Hi All,

How can I eliminate the blank lines from a file.

For e.g.

File1 contains
ABCD
EFGH

ZZZZ
HJHH

KJKJ

IUYU

I need the file to be as follows....
ABCD
EFGH
14,235
Posted By shashi_kiran_v
Hi Vino, I changed as mentioned but its not...
Hi Vino,

I changed as mentioned but its not working properly..

I had three months file i.e. sep, jun & may of 2005.

But it came out after copying jun's file instead of sep file.

Thanks...
14,235
Posted By shashi_kiran_v
Hi Vino, Thank you so much. The break...
Hi Vino,

Thank you so much. The break worked.

If there are many files of different months. The file would not copy the latest but infact it does the opposite.

After changing the month to...
14,235
Posted By shashi_kiran_v
Hi Vino, Thank you so much.... Its working. ...
Hi Vino,

Thank you so much.... Its working.
But we need to change the month as

month="jan feb mar apr may jun jul aug sep oct nov dec"

One more thing, I get the following message for the...
14,235
Posted By shashi_kiran_v
Hi Vino, Thank you very much. It worked.... ...
Hi Vino,

Thank you very much. It worked....

But can you help me with my previous query...
Can you please help me with the script.

Thanks
Shash
14,235
Posted By shashi_kiran_v
Hi, Thanks for all your help. I am able to...
Hi,

Thanks for all your help. I am able to execute the shell with couple of minor changes.

MONTH=`date +%b`
YEAR=`date +%y`
mth=$MONTH | tr '[A-Z]' '[a-z]'

But the translate function is...
14,235
Posted By shashi_kiran_v
Its /usr/bin/ksh ....
Its /usr/bin/ksh ....
14,235
Posted By shashi_kiran_v
#! /bin/sh MONTH=$(date +%b) YEAR=$(date...
#! /bin/sh

MONTH=$(date +%b)
YEAR=$(date +%y)
month=$(echo $MONTH | tr '[A-Z]' '[a-z]')

for file in *
do
if [ "$file" = *_$month$YEAR* ] ; then
FILE=${file%%_$month$YEAR}
cp $file $FILE...
14,235
Posted By shashi_kiran_v
I am getting an error on line 3 as the following...
I am getting an error on line 3 as the following even after following Vino's & reborg's guidelines...

test.sh: syntax error at line 3: `MONTH=$' unexpected

I am executing this on ksh...
Showing results 1 to 25 of 40

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