Search Results

Search: Posts Made By: sameermohite
971
Posted By sameermohite
Call and execute query from tables
Hi..

We have a table DB_QUERIES, in which sql queries are stored.

SQL> desc DB_QUERIES
Name Null? Type
-----------------------------------------...
Forum: Red Hat 07-16-2014
1,666
Posted By sameermohite
Rm -rf * sequence
If I run rm -rf * command under one parent directory.

/data > rm -rf *

Is there anyway to know which files will be deleted first ?

Start using code tags please, ty.
2,310
Posted By sameermohite
Thanks Scrutinizer.... It worked
Thanks Scrutinizer.... It worked
2,310
Posted By sameermohite
Replace 3rd occurance with new line or SQL output
Thanks all and Akshay ...

awk 'ORS = !(NR%3)? "\n" : FS ' RS=" " file -- This worked for me. But if there no lastname (3rd field is blank) it does not work.

I think If it can be done with...
2,310
Posted By sameermohite
Replace 3rd occurance of SPACE with newline
I have file with SQL output as

0001 firstname1 lastname1 0002 firstname2 lastname2 0003 firstname3 lastname3 0004 firstname4 lastname4

Expected output :
0001 firstname1 lastname1
0002...
1,291
Posted By sameermohite
Dynamic variable assignment
My Code :
--------------------------------------------
#!/bin/bash

for i in `echo server1 server2`
do
eval ${i}_name = "apache"
echo ${i}_name
done...
Forum: Red Hat 11-29-2013
1,440
Posted By sameermohite
Find processes by start time
How do I find the process ( which might got completed ) which were ran at specific time.

for e.g. I should be able to find below process after 2 hrs if I find by time 04:00

myuser 23285 22522 ...
7,623
Posted By sameermohite
Hi all .. thank you very much for prompt...
Hi all ..
thank you very much for prompt reply..

@krishmaths - your answer suits my requirement perfectly
@skrynesaver- perl also works but it shows output in separate line.
@Don cragon - It...
7,623
Posted By sameermohite
Extract multiple occurance of strings between 2 patterns
I need to extract multiple occurance strings between 2 different patterns in given line.

For e.g. in below as input...
26,251
Posted By sameermohite
Autosys file watcher
Autosys uses "jil" to add job (watcher/command/box etc)
It is basically job description. For e.g. your filewatcher job will have
You can set these fields ...
1,542
Posted By sameermohite
Use Find command with -exec find . -name...
Use Find command with -exec
find . -name 'filename*' -exec chmod 777 {} \;
4,267
Posted By sameermohite
If you want to use command to move files ...
If you want to use command to move files

File move by subject line of mail :

mv $(ls inbox/*hey*) hey/

first hey = mail having subject
second hey/ = directory to which mails are to be moved...
4,267
Posted By sameermohite
This should work for you. mv $(grep -l hey...
This should work for you.

mv $(grep -l hey inbox/*) hey/


Found this from google.... :)
24,849
Posted By sameermohite
This sed statement is used to grep getdate() as...
This sed statement is used to grep getdate() as well as 1st and 2nd character from the line.

sed 's/.*getdate(),\(.*\),\(.*\),.*/\2/' < file

sed = sed editor
's/ = search
.*getdate(), = ...
Showing results 1 to 14 of 14

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