Search Results

Search: Posts Made By: Roozo
5,961
Posted By Roozo
Date format YYYY/MM/DD to DD/MM/YYYY
I am getting output of YYYY-MM-DD and want to change this to DD/MM/YYYY.
When am running the query in 'Todd' to_date(column_name,'DD/MM/YYYY') am getting the required o/p of DD/MM/YYYY, But when am...
1,949
Posted By Roozo
Line 6 is miss typed, sorry for that. Command is...
Line 6 is miss typed, sorry for that. Command is working as expected. thanks
2,715
Posted By Roozo
Thanks Rudic and Yoda for your help !!
Thanks Rudic and Yoda for your help !!
2,715
Posted By Roozo
Delete line by pattern match in column
file:
1|12322|tow|
5|23422|pow|
6|23423|cow|
3|34324|how|

deletelines:
12322
23423


My command to delete line

while read NUM
do
awk -F"\|" '$2 !~ /`"$NUM"`/' file >file.back ...
1,707
Posted By Roozo
Thanks Don :) On the given example I have...
Thanks Don :)

On the given example I have miss typed "/" instead of "-"

Now I have checked the fields by using the below.

awk '
/lastProcessedTs/ { n = split($NF, d, /[-T:.]/)
print (...
1,707
Posted By Roozo
Check time stamp formate in file
I have to check whether last line of the file has time stamp or not.

File.txt

cong = 0
This formats a date and time into the given strftime() format = 09
Dates can be passed to Smarty as...
9,821
Posted By Roozo
Roger that. Changed :)
Roger that. Changed :)
9,821
Posted By Roozo
Thanks Don, If we use EOF without quote it...
Thanks Don,

If we use EOF without quote it will create a below error right, so I have moved the awk out of loop
The error context is ( >>> ~ <<<

...
9,821
Posted By Roozo
Thanks for the post Don. I created the post...
Thanks for the post Don.

I created the post when search were created problem now while execution there were issue, so I will explain what I'm doing inside the shell.

I'm trying to log in as...
9,821
Posted By Roozo
Thanks a lot Don. The highlighted first and...
Thanks a lot Don.

The highlighted first and second variables return empty.


ssh user@box –P password <<-"EOF"
awk -vvar1=”${VAR}” –vvar2=”${SYSTEM}” -F”\|” ‘($1 == var1 ) && ($3...
9,821
Posted By Roozo
Thanks Ravinder, I’m using this inside the...
Thanks Ravinder,

I’m using this inside the shell, so I have modified like,

Method1:
awk -vvar1=”${VAR}” –vvar2=”${SYSTEM}” -F”\|” ‘($1 == var1 ) && ($3 == var2) {print $1,$2}’ file...
9,821
Posted By Roozo
file: server1|121|base|1| ...
file:

server1|121|base|1|
server2|232|case|1|
server3|454|base|1|

VAR=server1 ---> say we have server1 in the variable

When I tried with the below command I dint get any output.
...
9,821
Posted By Roozo
awk search pattern in column
Want to search a pattern in column

using the below command which not helpful

awk -F"\|" '$1 == '"${VAR}"' {print $1,$2}' file

how to search using "==" with variable other than the...
6,826
Posted By Roozo
Hi Don, I tried the above, When...
Hi Don,

I tried the above,

When executing the ssh command with or without EOF concept, it will ask for my personal user id "roozo" other than user1(machine user)

When executing the...
6,826
Posted By Roozo
Thanks Chubler_XL, I just learned about...
Thanks Chubler_XL,

I just learned about ssh and tried in command prompt and it working as expected.

ssh -keygen - To set up public/private key.

ssh host1 - To login to another host...
6,826
Posted By Roozo
Switch user without password inside shell
I want to switch to another user without password inside shell.

I used the below command and it is not working.

sudo su - user1

user1 is not in the sudoers file. This incident will be...
4,020
Posted By Roozo
Thanks Don Cragun.
Thanks Don Cragun.
4,020
Posted By Roozo
Hi in2nix4life, Thanks for your reply, ...
Hi in2nix4life,

Thanks for your reply,

-antu option is not working in ksh.

I used netstat -a which gave me the below output.

tcp 0 0 server1.00000 server2.00000 ESTABLISHED
...
4,020
Posted By Roozo
Count no of netstat states
netstat | awk '/server/ {for(i=1;i<2;i++) {getline;print}'

Output:
ESTABLISHED
ESTABLISHED
ESTABLISHED
ESTABLISHED
ESTABLISHED
TIME_WAIT
TIME_WAIT



From the above command I'm...
5,764
Posted By Roozo
To split a file in exact half using awk
file:
1
2
3
4
5
6
7
8
9
10


code:

awk 'END{if( < NR/2) {print $0}}' file
The above has some error

Output needed:
1,828
Posted By Roozo
Small change on awk. #!/bin/ksh ...
Small change on awk.


#!/bin/ksh

echo "enter SID"
read SID
echo "enter filename"
read filename
awk -F";" '/'"$SID"'/ { print $2 }' ${filename}
exit 0



try...
3,693
Posted By Roozo
RM help
Can some one help meon Resource manager options


vsg resource name --->for status
rset resource test --->To kick off thejob
rmmaint -c RMG ----> Will have all job details/staus ...
1,347
Posted By Roozo
Thanks it works, can you explain how it works?
Thanks it works, can you explain how it works?
1,347
Posted By Roozo
If both condition satisfied
pattern
tin loop 3
tin xarg 1
tin jim 5
tin icon 2
tin tour 4

patn.out
tin loop 3
tin jim 5
tin icon 1
tin tour 2

while read one two three
do
awk '$2 ~ /'"$two"'/' patn.out ||...
1,472
Posted By Roozo
Thanks, I was in c and used decrement by mistake.
Thanks, I was in c and used decrement by mistake.
Showing results 1 to 25 of 71

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