Search Results

Search: Posts Made By: jhonnyrip
2,088
Posted By jhonnyrip
Compare two variables and print the difference
compare two variables and print the difference

i have two variables

X1=rac1,rac2
Y1=rac2,rac3

output=rac1,rac3

Use code tags to wrap code fragments or data samples.
921
Posted By jhonnyrip
what happens if more than 2 files with latest...
what happens if more than 2 files with latest dates and i need dynamic script

/tmp/testlog/log/KSR01_2018-07-05.log
/tmp/testlog/log/KSR01_2018-07-06.log
/tmp/testlog/log/KSR04_2018-07-06.log...
921
Posted By jhonnyrip
Latest list of files of each type
find /tmp/testlog/kSR*"_"2018* -type f -printf '%T@ %p\n' | sort -n | tail -3 | cut -f2- -d" "
/tmp/testlog/log/KSR04_2018-07-05.log
/tmp/testlog/log/KSR04_2018-07-06.log...
974
Posted By jhonnyrip
that worked ty
that worked

ty
974
Posted By jhonnyrip
Grep util last occurrence
I have file contents

/tmp/x/abc.txt
/home/bin/backup/sys/a.log

I need this output:
/tmp/x/
/home/bin/backup/sys/

Can somebody please help me out

Please use CODE tags as required by...
7,660
Posted By jhonnyrip
Ssh remote command and print same line
john-test:/root> ssh -q chicago-ser uname;date
Linux
Fri Oct 13 16:41:11 GMT 2017

How I can print on the same line like this :
Linux Fri Oct 13 16:41:11 GMT 2017
2,521
Posted By jhonnyrip
grep ORA- from log files and ignore all pattern...
grep ORA- from log files and ignore all pattern in i.txt
2,521
Posted By jhonnyrip
Grep and ignore list from file
cat /tmp/i.txt
'(ORA-28001|ORA-00100|ORA-28001|ORA-20026|ORA-20025|ORA-02291|ORA-01458|ORA-01017|ORA-1017|ORA-28000|ORA-06512|ORA-06512|Domestic Phone|ENCRYPTION)'

grep -ia 'ORA-[0-9]\{5\}:'...
1,372
Posted By jhonnyrip
Grep fields from file
I have two files

file1 : USER CURR_TIMES FAIL_CO F_TIME LAST_O_TIME
---------- -------------------------- ------------ ------------------- -------------------
T123 2017-02-25...
843
Posted By jhonnyrip
fields keep on changing , i am looking between ...
fields keep on changing , i am looking between
|0 and before third occurrence of |it could be anything
843
Posted By jhonnyrip
awk help
here is my file:
#x8f;|test king|41096|SA3289|testk@ya.com|08/24/2016 05:34:04|08/24/2016 05:38:29|5|1|5|PRO| | | | | | ||EOR

output :
8/24/2016 ...
1,963
Posted By jhonnyrip
Print lines after matching two pattern
would like to print everything after matching two patterns AAA and BBB.

output :

CCC
ZZZ
sample data :


AAA
BBB
CCC
ZZZ
1,168
Posted By jhonnyrip
sorry , the format is wrong and here is the...
sorry , the format is wrong and here is the correct format

I have data like this
1 a b c
2 a c
3 b d
4 e f

would like convert like this
1 a
1 b
1 c
2 a
2 c
3 b
3 d
4 e...
1,168
Posted By jhonnyrip
Split multi columns line to 2 columns
I have data like this
1 a,b,c 2 a,c 3 b,d 4 e,f would like convert like this 1 a 1 b 1 c 2 a 2 c 3 b 3 d 4 e 4 f

Please help...
1,436
Posted By jhonnyrip
Grep everything between two pattern if match not found
I need to help to work this

Print everything between 2 patterns if grep is not found the search word
example

Detroit
orange
cat
bat
rat
apple

sed -n "/Detroit,/apple/p" d |grep ...
1,117
Posted By jhonnyrip
it worked , thanks
it worked , thanks
1,117
Posted By jhonnyrip
Passing variable from file to Oracle
cat a1
scott
robert
tom
test

script :
#!/usr/bin/ksh

for NAME in `cat a1`
do
VALUE=`sqlplus -silent "nobody/bobody01@testq" <<END
set pagesize 0 feedback off verify off heading off...
842
Posted By jhonnyrip
Thanks and it worked
Thanks and it worked
842
Posted By jhonnyrip
Grep script name with path
would like to grep everything from first occurrence of / until >(not includes)

example :

0 5 * * * /usr/local/bin/shell/test.sh >/tmp/test.log
Output would be :...
1,959
Posted By jhonnyrip
I am looking something like this start with first...
I am looking something like this start with first "/" and end with "2>"

Thanks

Johnny
1,959
Posted By jhonnyrip
05,10,15.20,25,30 * * * /tmp/test.sh...
05,10,15.20,25,30 * * * /tmp/test.sh 2>/tmp/test.log

does not work for above one
1,959
Posted By jhonnyrip
Grep script name with path from crontab
I need help to grep file name with path from crontab

ex : 0 5 * * * /tmp/test.sh 2>/tmp/test.log

output : /tmp/test.sh



Please use code tags next time for your code and data. Thanks
1,025
Posted By jhonnyrip
crontab
would like to run job on Unix crontab, every 10 minutes EXCEPT between 4:30 am and 4:45 am. Please help me out, how would I do.

Thanks
Jhonny
3,289
Posted By jhonnyrip
You guys are awesome and it worked Thanks...
You guys are awesome and it worked

Thanks again
3,289
Posted By jhonnyrip
Grep word between matched pattern
would like to print word between matched patterns using sed

for example :

create INDEX SCOTT.OR_PK ON table_name(....)

would like to print between SCOTT. and ON which is OR_PK

Please...
Showing results 1 to 25 of 28

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