Search Results

Search: Posts Made By: varun22486
934
Posted By varun22486
Pad 0 to the right
I need to pad 0 to a number on the right. to make it 9 digit in total.

My number is 2457

output should be 245700000

Please do wrap your samples/codes into CODE TAGS as per forum rules.
973
Posted By varun22486
Thanks, Worked fine.
Thanks, Worked fine.
973
Posted By varun22486
It gave me a syntax error
It gave me a syntax error
973
Posted By varun22486
It changed it to 93:00:00. i want it to be...
It changed it to 93:00:00. i want it to be 09:30:00
973
Posted By varun22486
Change in the file
Hi,

I have a file which has wrong time format and we want to correct it before we load it.

WRONG FORMAT : 93:0:00
CORRECT FORMAT :09:30:00

If you notice the 0 at the front is missing. Its...
1,844
Posted By varun22486
Replace end of file with ','
Hi,

I have a file with below

ABC
XYZ
123

I want it to look it like


'ABC','XYZ','123'

I tried tr '\n' "'\,\'" but no luck


Please use CODE tags as required by forum rules!
3,128
Posted By varun22486
It worked, Thank you
It worked, Thank you
3,128
Posted By varun22486
WLST script python
Hi I am using below code to check the WEBLOGIC substate ealth but getting sytax error.. can anyone help?

servers=domainRuntimeService.getServerRuntimes()
for server in servers:
...
734
Posted By varun22486
Replace a string on specific lines which match a pattren
Hi Experts,

I have a file which contains a pattern multiple times i.e. matchthispattren. If a line is matched with this pattern. I want a number in 1234567890 to 123456789 in that line. (Basically...
2,381
Posted By varun22486
working with URF on SQLPLUS
I have below SQL that I wasnt to run from a solaris machine using sqlplus

select * from TABLE_NAME where regexp_like(field_value,...
864
Posted By varun22486
Working with UTF char sqlplus
I have below SQL that I wasnt to run from a solaris machine using sqlplus

select * from TABLE_NAME where regexp_like(field_value,...
2,381
Posted By varun22486
Also when i cat the file i see the UTF chars but...
Also when i cat the file i see the UTF chars but when I do a vi..I just see numbers not the actual UTF CHars.



Any help will be appreciated.

---------- Post updated at 10:28 AM ----------...
2,381
Posted By varun22486
Ok, I changed my setting in...
Ok, I changed my setting in putty->window->translation and it worked. As soon as i did sudo to application user it again stops working so something is getting change.. not sure how to get it working...
2,381
Posted By varun22486
Hi, I am using a solaris machine. I am using...
Hi, I am using a solaris machine.

I am using a terminal (Putty)

set fileencoding is not a valid options.

Please help I really need to get this going
2,381
Posted By varun22486
$ locale LANG= LC_CTYPE=en_US.UTF-8 ...
$ locale
LANG=
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=


When I try to post UTF chat.. in a vi editior. It still changes to .
2,381
Posted By varun22486
Copying a file with UTF char on UNIX server
Hi,

I need to run a SQL which check for special UTF char in DB. When I try to copy that in UNIX file it changes it to some wierd chat. How can in retain the UTF chars in my script?

e.g....
2,971
Posted By varun22486
It worked fine.. but it got rid of empty lines, I...
It worked fine.. but it got rid of empty lines, I dont want that to happen. I need them for my formating purpose.

every job should have a blank line before next jon starts
2,971
Posted By varun22486
nawk 'gsub (/RUN/, "&") > 1 {sub (/\n *RUN ANY...
nawk 'gsub (/RUN/, "&") > 1 {sub (/\n *RUN ANY *\n/,"\n")}1' RS= cmdsDly_JIL.pull_job_esp
nawk: input record `UNIX_JOB CMDJ000J
...' too long
source line number 1
2,971
Posted By varun22486
Remove duplicate line starting with a pattern
HI,

I have the below input file

/* ----------------- cmdsDlyStartFWJ -----------------*/
UNIX_JOB CMDS065J
RUN ANY
CMDNAME sleep 5
AGENT CMDSHP
USER proddata
RUN...
1,448
Posted By varun22486
Nope - yu see its changeing all the / to /* -. I...
Nope - yu see its changeing all the / to /* -. I dont want that. onlything i need is if job is FILE_TRIGGER.. remove the line that has ENAVR ENV=/home2******

>>cat test2.sh
/usr/xpg4/bin/awk '
...
1,448
Posted By varun22486
I dont think its working.. see below. i used the...
I dont think its working.. see below. i used the code from #7 and still messed up result

>>cat test2.sh
/usr/xpg4/bin/awk '
$2 ~ "^ *FILE_TRIGGER"{gsub(" *ENVAR ENV=/home2/[^\n]*\n","")}
...
1,448
Posted By varun22486
No luck >>cat test2.sh ...
No luck


>>cat test2.sh
/usr/xpg4/bin/awk '
$2 ~ "^ *FILE_TRIGGER"{gsub(" *ENVAR ENV=/home2/[^\n]*\n","")}
NF{printf "%s","/* -"$0}' RS='/
-' FS='\n' txt...
1,448
Posted By varun22486
>>cat test2.sh /usr/xpg4/bin/awk ' $2 ~...
>>cat test2.sh
/usr/xpg4/bin/awk '
$2 ~ "^FILE_TRIGGER" {gsub("\nENVAR ENV=[^\n]*\n","")}
NF{printf("%s", "/* -"$0)}' RS='/
-' FS='\n\n' txt

OUTPUT-------

/* - /* -* -----------------...
1,448
Posted By varun22486
>>cat test2.sh awk ' $2 ~ "^FILE_TRIGGER"...
>>cat test2.sh
awk '
$2 ~ "^FILE_TRIGGER" {gsub("\nENVAR ENV=[^\n]*\n","")}
NF{printf("%s", "/* -"$0)}' RS='/
-' FS='\n\n' txt

>>./test2.sh
awk: syntax error near line 2
awk: bailing out...
1,448
Posted By varun22486
Change nth depending on matiching a pattern in Y line
Hi,

I have below file, each line that starts with /* marks the beginning of the a new job.
/* ----------------- cmdsMlyMoveTPMPLANTJ -----------------
UNIX_JOB CMMM002J
CMDNAME...
Showing results 1 to 25 of 31

 

Featured Tech Videos

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