Search Results

Search: Posts Made By: bsnithin
5,058
Posted By bsnithin
You need to add the contents shared by Jim to...
You need to add the contents shared by Jim to your crontab file. Refer crontab command for scheduling a task.

-Nithin
4,421
Posted By bsnithin
Hi Maya, Are the Pharmacy id's fixed ? In...
Hi Maya,

Are the Pharmacy id's fixed ? In the sense you know all 450 Pharmacy id's right? If yes, I have provided a simple script which can be used.


#!/bin/ksh

pharmacy_ids="p_id1 p_id2...
6,038
Posted By bsnithin
Hello, You can change colour in ksh. Kindly...
Hello,

You can change colour in ksh. Kindly refer below link.

Change colour codes (http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/)
1,744
Posted By bsnithin
Hey Sunny, I hope sleep will not use much...
Hey Sunny,

I hope sleep will not use much memory & CPU. If you would prefer not to use sleep then I would suggest you to schedule the script as a cron job.

I am not sure why you would need disk...
1,233
Posted By bsnithin
Hey, I think you should include redirection...
Hey,

I think you should include redirection in apache/web server configuration during this maintenance period. I hope there is nothing to do with cronjob.

-Nithin.
25,921
Posted By bsnithin
This will work #!/bin/bash cd...
This will work

#!/bin/bash
cd /export/home/xjanptak/bin/roaming/filijank/test/cookrie/
sqlplus testing/testing123 @cookrie.sql
sqlplus testing/testing123 @refresh.sql
ssh aslmuat3@s1tstd31 <<...
25,921
Posted By bsnithin
If you want only to use ftp, you can use .netrc...
If you want only to use ftp, you can use .netrc file in which you can save user name, IP address & password. So that when you connect, you will not be prompted for the same.

If you want to use...
15,715
Posted By bsnithin
Hema, If you want to transfer only...
Hema,
If you want to transfer only latest/updated files from one Unix server to another. I would suggest you to use rsync.

-Nithin.
2,201
Posted By bsnithin
Hello, No, we did not get any solution for this...
Hello,
No, we did not get any solution for this problem.

Thanks,
Nithin.
2,201
Posted By bsnithin
Retrieve old file in Solaris 10
Hello guys,

I mistakely updated a file on Solaris 10. Any idea on how can I get the older version of file(File before being updated) back?

Note: I do not have root access & have logged in as...
13,958
Posted By bsnithin
Here is it #!/bin/ksh if [ -z $1 ] ...
Here is it

#!/bin/ksh

if [ -z $1 ]
then
echo "Enter input file" ;
exit 1 ;
elif [ ! -r $1 ]
then
echo "The file $1 is not readable" ;
exit 2 ;
else
file=$1
while [ 1 -gt 0 ]
...
13,958
Posted By bsnithin
What about checking if the file is updated using...
What about checking if the file is updated using file size? If you are ok, I do have a script ready.
-Nithin.
4,904
Posted By bsnithin
Hope this works#!/bin/sh CURWEEK=`echo...
Hope this works#!/bin/sh

CURWEEK=`echo "ABC0001 20100115124" | cut -c18-19`
LASTWEEK=`echo "ABC0001 20100108125" | cut -c18-19`

if [ `echo "$CURWEEK - $LASTWEEK" | bc` -eq 1 ];then
# Your...
4,904
Posted By bsnithin
Hello, You can extract file number (position...
Hello,

You can extract file number (position 17-19) using cut command below

I am not sure how your file names would be. For eg if you want to check this for list of files in a directory etc.
...
2,153
Posted By bsnithin
Freddie, The above command just substitutes...
Freddie,

The above command just substitutes current hour o/p in place of %H & current minute o/p in place of %M. Eg: If current time is 09:49, your statement will be something like this....
5,757
Posted By bsnithin
Can you try this ? #!/bin/ksh while [ 0...
Can you try this ?

#!/bin/ksh

while [ 0 -lt 1 ]
do
if [ -f *.xml ]
then
echo "File found" ;
else
echo "File not found" ;
mailx -s "File not found" <email id> ;
fi
sleep 900...
10,950
Posted By bsnithin
If you don't have FTP server on Windows machine,...
If you don't have FTP server on Windows machine, you have to write dos batch files using some ftp client & copy to Unix server.

-Nithin.
10,950
Posted By bsnithin
Anupam, If you want to copy files from...
Anupam,

If you want to copy files from Desktop (Windows XP), you need FTP server running on your desktop (Windows XP machine). Do you have that?

-Nithin.
1,996
Posted By bsnithin
Can you try this?svmon | head -2 -Nithin
Can you try this?svmon | head -2
-Nithin
7,669
Posted By bsnithin
What is the size of report file? Did you get any...
What is the size of report file? Did you get any error while trying to email the report file?

-Nithin.
2,067
Posted By bsnithin
You can write a script with mailx command to...
You can write a script with mailx command to email the log file. This script needs to be scheduled using crontab.
-Nithin.
1,748
Posted By bsnithin
Can you try this? #!/bin/ksh sort -k2...
Can you try this?

#!/bin/ksh

sort -k2 inp.txt -o inp.txt
Pre_val="" ;
while read line
do
Sec_val=`echo $line | awk '{ print $2 }'` ;
if [[ "${Pre_val}" != "${Sec_val}" ]]
then
if [...
1,118
Posted By bsnithin
One approach is to use grep command ...
One approach is to use grep command


#!/bin/ksh

proj_choice="Test"
test_var="ABC Test blah foobar etc"
echo $test_var | grep $proj_choice > /dev/null 2>&1
ret_val=$?

if [ $ret_val -eq 0...
1,633
Posted By bsnithin
No as I said earlier, I have never used SSH in...
No as I said earlier, I have never used SSH in script with password & I am not sure of any other authetication other than "Public key authentication".
-Nithin.
2,451
Posted By bsnithin
It worked. I just tried now. If you want year in...
It worked. I just tried now. If you want year in 4 digits, you can use Y

mv xxxxx.pdf xxxxx`date +'%m%d%Y'`.pdf
Showing results 1 to 25 of 67

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