Search Results

Search: Posts Made By: shekhar2010us
2,886
Posted By shekhar2010us
Sorry for the unclear requirements . I did not...
Sorry for the unclear requirements . I did not find better words to explain it.

Yes I need 20 files per hour for every hour in the directory and delete the remaining files. The 20 files could be...
2,886
Posted By shekhar2010us
I need 20 files per hour. But the code I have...
I need 20 files per hour. But the code I have written is for 60 files per hour.
That's why I told this is not the best solution.

My requirement is:
From a directory having files created at...
2,886
Posted By shekhar2010us
Delete File in a Directory Using a Condition
Hello,

I have a directory with many files whose creation time is distributed all over the day.

I need ANY 20 files per hour. So, I need
20 files for hour 00
20 files for hour 01
...
20...
1,100
Posted By shekhar2010us
I m using mac osx. Can't find version of stat. ...
I m using mac osx. Can't find version of stat.
Sorry..
1,100
Posted By shekhar2010us
This is how I am calculating the score of each...
This is how I am calculating the score of each file... splitting the filename and adding the parts and multiply it with the filesize....

Now what I am not able to do is to take files with 50...
1,100
Posted By shekhar2010us
Conditional File Selection From a Directory
I have a directory with files that was saved all along the day at different times. Every day I have to run a program that will select 50 files for each hour which has the maximum score.

Sample...
1,255
Posted By shekhar2010us
Many Thanks Yoda and Don. Don, you are correct....
Many Thanks Yoda and Don.
Don, you are correct.
1) The input might not be same only in adjacent lines
2) The list is comma separated and when I checked with some tweaks in the inputs , it produces...
1,255
Posted By shekhar2010us
Reducing text file using similar lines
Hello,

I am a java programmer but want to try unix for a purpose where I need to reduce a file using its first field.. Here is the sample data:

admin;2;0;[yrral];[]
admission;8;0;[timlu];[]...
1,175
Posted By shekhar2010us
Thanks. I know how to replace a specific...
Thanks.

I know how to replace a specific column in all lines, but could not figure out how to match and replace.
1,175
Posted By shekhar2010us
Simple awk use
Hi,

I have a file such that:

40454,31,48,4,1304.967741935484,1
31708,25,48,4,1268.32,1
20900,64501,671,788,0.3240259840932699,0
20137,51358,834,743,0.3920908135051988,0

I want to replace...
3,853
Posted By shekhar2010us
@guruprasadpr Awesome answer. I knew 'awk'...
@guruprasadpr

Awesome answer. I knew 'awk' can solve this problem. To filter 1 file, java took 27 minutes and shell took 12 seconds :-)

I added a filter of length of both the first fields and...
3,853
Posted By shekhar2010us
String matching using awk
Hello,

I am working with google ngram data set which is of size 100s of gb. Before using it with Java, I wanted to filter it out using shell script.

Here is a sample line in the file:

2.55 ...
2,180
Posted By shekhar2010us
Print only matched string instead of entire line
Hi,

I have a file whose lines are something like
...
1,351
Posted By shekhar2010us
Thanks a lot balajesuri and scrutinizer for a...
Thanks a lot balajesuri and scrutinizer for a prompt reply... that worked....
1,351
Posted By shekhar2010us
Help in file parsing with awk
Hi,

I have a data set as shown below:

09e757fd,22727,2012-03-01,text1,text2,to
3fd0cae7,310,2012-03-01,text3,text4,to
3fd0cae7,310,2012-03-01,text3,text5,to...
25,165
Posted By shekhar2010us
Thanks DGPickett I am not using php database...
Thanks DGPickett

I am not using php database interface because I am running the query in a remote server, and ssh/ftp is switched off in my version of php, also since I am not the administrator I...
25,165
Posted By shekhar2010us
Alternatively, I can save the output in Log and...
Alternatively, I can save the output in Log and then parse it to store them in an array so that I can put them in table.....
As of now I have the query output in the file as:

NAME ...
25,165
Posted By shekhar2010us
I tried to store the query results in an array....
I tried to store the query results in an array. Here is the code.

ssh <user>@<ip> <<SCRIPT > Log
let i=0
set -A arr
echo "<query>;
exit
" | sqlplus -s <usr>/<pass> | \
while read line
do...
25,165
Posted By shekhar2010us
Run Sql plus in shell script
Hello,

I want to connect to ssh, run a query, and store that into a variable in the shell script. Also I need to pass the variable back to php to display the query results.
I have created a...
3,618
Posted By shekhar2010us
Its not working either. echo and print, both...
Its not working either.
echo and print, both works if used on command line
3,618
Posted By shekhar2010us
run query in shell script after ssh
Hi,

I need to run sql query in shell script after getting connected to ssh. For that I connected to ssh through shell script using RSA keys [done]. Now when I am running sql query, it's not...
10,462
Posted By shekhar2010us
Updates: I did a mistake on creating a...
Updates:

I did a mistake on creating a folder named authorized_keys instead of appending the content of id_rsa.pub into authorized_keys..

Now, ssh is working without entering password. Thanks
10,462
Posted By shekhar2010us
Thanks Everyone. I am trying ssh-keygen. ...
Thanks Everyone.

I am trying ssh-keygen.

Home addresses after logging into local and remote hosts are:
Local host: /mm/ums/home/user1/
Remote host: /home/user2/
The users are different,...
10,462
Posted By shekhar2010us
Thanks Corona, Can you let me know how to use ssh...
Thanks Corona, Can you let me know how to use ssh keys. Do you mean RSA keys?

---------- Post updated at 04:33 PM ---------- Previous update was at 04:32 PM ----------

Also, I cannot install...
10,462
Posted By shekhar2010us
ssh through "expect" in shell script
Hi,

I am trying to use "Expect" in shell script to ssh and do some work in remote server but I am unable to connect. Here is the code I am using.

#save as test.sh
set ip "10.10.10.10"
set...
Showing results 1 to 25 of 64

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