Search Results

Search: Posts Made By: prince1987
2,964
Posted By prince1987
Thanks for your reply, I can correct my syntax....
Thanks for your reply, I can correct my syntax. By any chance can you help me on how to print variable and its value which is satisfying the condition in IF loop ?

Thanks,
2,964
Posted By prince1987
How to write a Boolean variable which succeed and failed inside the if loop in shell script ?
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes...
1,340
Posted By prince1987
Am using 3.10.0-957.1.3.el7.x86_64 and ksh shell ...
Am using 3.10.0-957.1.3.el7.x86_64 and ksh shell

Thanks,
1,340
Posted By prince1987
Comparing 2 variables in UNIX
Hi,

I have 2 variables as given below. How can i compare them and say its matching ? Appreciate your help
VAR1=describe/read/write
VAR2=read/write/describeThanks,


Please use CODE tags as...
3,862
Posted By prince1987
Sure, Am using red hat linux version 6. I have...
Sure, Am using red hat linux version 6. I have script for cleaning logs. I have to cleanup logs every 45 days. So i have to execute script every 45 days.

For example, If i run the script today...
3,862
Posted By prince1987
Crontab scheduler to execute script every 45 days
Can someone please help me on how to schedule script to run every 45 days in crontab ?

Thanks,
Prince
3,289
Posted By prince1987
Thanks a lot. This works :)
Thanks a lot. This works :)
3,289
Posted By prince1987
Thanks, This works :) ---------- Post...
Thanks, This works :)

---------- Post updated at 01:35 AM ---------- Previous update was at 01:34 AM ----------

Thanks this works fine :)
3,289
Posted By prince1987
Hello, It works if number is below 0000099,...
Hello,

It works if number is below 0000099, If its above 0000100, it is not working as expected.

$ LOGNUM=0000120
$ printf "%0${#LOGNUM}d\n" "(( $LOGNUM - 1 ))"
0000079

Thanks,

Please...
3,289
Posted By prince1987
Please help - Command to Subtract two numbers without losing prefix zeros
Hello,

I have a variable LOGNUM with values 0000095, When i subtract the variable by 1, Its losing its leading zeros. Can you please help me here ?

LOGNUM=0000095
$OLDLOG=`echo...
891
Posted By prince1987
Wow.. Thanks. It works as expected :)
Wow.. Thanks. It works as expected :)
891
Posted By prince1987
Please - Looking for a online command to delete files
I have list of files like below, I want to delete files older than 2 days except S0000000.LOG, I have command find /export/home/X_GZPQJK/out/file* -mtime +1 -exec rm {} \; but it is deleting...
Forum: Solaris 02-03-2017
3,671
Posted By prince1987
Solaris Date format help please
I have list of dates in a file. Am reading each line and trying to format date, Can you please help me ?

Sample file content:

02/22/16 USA is great country
02/21/16 USA future
02/23/16 who is...
1,324
Posted By prince1987
IT works nice, Thanks buddy!
IT works nice, Thanks buddy!
1,324
Posted By prince1987
I have below awk command but it brings all the...
I have below awk command but it brings all the lines to single messages when ever it finds JMS_BODY_FIELD, I want them just like that without bringing them to single line.


awk...
1,324
Posted By prince1987
awk command to get file content until 2 occurrence of pattern match
AWK command to get file content until 3 occurrence of pattern match,


INPUT FILE:

JMS_BODY_FIELD:JMSText = <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<custOptIn...
1,040
Posted By prince1987
But in same directory i have files starting with...
But in same directory i have files starting with 0 as well, When i compare 09876, then its displaying 9876, When i grep 09876 it should display 09876

for example:

ls -ltr|grep 09876
09876

...
1,040
Posted By prince1987
Please help on UNIX grep command for numbers
I have a list of files like below, Do we have grep command to find files?

If i grep 03874 it should display the file 3874, Grep command should ignore 0 at the beginning. There could be more many...
5,495
Posted By prince1987
Replace a string in a xml file
Hello,

I have below xml file, I want to find line default-value and replace the string within quotes followed by default-value "moni/Websphere/". Replace moni/Websphere/ with monitor/AMQ/
...
1,728
Posted By prince1987
Hello, Am using kernel shell. Aww computing...
Hello,

Am using kernel shell. Aww computing help me.

Thanks,
1,728
Posted By prince1987
Do you know any commands in UNIX without perl...
Do you know any commands in UNIX without perl script? For example if its 25 hours, then our result should be.

1day,1hour,0min,0sec.

Appreciate your help!
Thanks

---------- Post updated at...
1,728
Posted By prince1987
Can anyone help me to print UNIX epoch time to days,hours,min,sec ?
I have unix epoch time 1441678454803, Can you please help me to print this time in below format ?

DAY,HOUR,MIN,SEC

Appreciate your help!!!

Thanks,
Prince
1,399
Posted By prince1987
How to print only the digit in between a line in UNIX?
Below is my content in a file. How to print only the number in between CURDEPTH( ) ?? Please help me

5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Starting MQSC for queue...
21,501
Posted By prince1987
AWK getline command to read more then two lines
Hello,

Am trying to print three lines in a single line using AWK getline command.

Below is the command am trying and its displaying only two lines in a single line.
Command:
awk '{getline...
3,537
Posted By prince1987
Could you please let us know the closest value?
Could you please let us know the closest value?
Showing results 1 to 25 of 31

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