Visit Our UNIX and Linux User Community


Issue on new server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Issue on new server
# 1  
Old 07-23-2009
Issue on new server

I use to run my scripts by .test.ksh now I have to do ./test.sh.

I think something is not correctly set up on the server. Can someone tell me the difference between . and ./

I though ./ meant force the script to run even it cannot find the path of way the script actually is?

---------- Post updated at 03:28 AM ---------- Previous update was at 03:26 AM ----------

typeo error

I use to run my scripts by .test.ksh now I have to do ./test.ksh.

I think something is not correctly set up on the server. Can someone tell me the difference between . and ./

I though ./ meant force the script to run even it cannot find the path of way the script actually is?
# 2  
Old 07-23-2009
the PATH settings could be wrong. check the PATH on old and new server...
# 3  
Old 07-23-2009
The PATH variable is the problem.

When PATH has a single dot in it -- that means to search the current directory for the executable. . == current working directory

No dot means that you have to use ./ unless the directory is defined in PATH

example
Code:
cd /home/me
PATH=.:/usr/bin:/usr/sbin
# this will execute a script in /home/me
myscript.shl
PATH=/usr/bin:/usr/sbin
# this will not work now
myscript.shl
# this will execute the script now
./myscript.shl

WARNING - having a . in your PATH can be a security risk. root and other privileged accounts should never, ever have a dot in the PATH variable.

Previous Thread | Next Thread
Test Your Knowledge in Computers #974
Difficulty: Medium
Version 1.0 of the Linux kernel was released on 14 March 1994.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with email sent from Linux server

I have written a shell script to send email to users with message body and attachment. Message body has registered symbol. But when I receive the email, registered trademark symbol has a special character prefixed and appears carlington work® whereas I am expecting to see only carlington work® .... (3 Replies)
Discussion started by: Leo87
3 Replies

2. Red Hat

NTP Server issue

Hi team, I was like try to create an NTP time server under my RHEL6 box, but once I try to sync other Windows clients (and some Linux) I alway get an error with syncing with my NTP server, here is my non-hashed ntp.conf file parameters: driftfile /var/lib/ntp/drift restrict 192.168.238.0... (14 Replies)
Discussion started by: leo_ultra_leo
14 Replies

3. Solaris

Server disk issue need help

Hello all, Our Solaris 9? Sun Fire 480R backup server(in another city) is throwing disk errors such as these repeatedly. WARNING: vxvm:vxio: Subdisk rootdisk-02 block 24037056: Uncorrectable read error WARNING: vxvm:vxio: Subdisk rootdisk-02 block 7767072: Uncorrectable write error ... (18 Replies)
Discussion started by: RyanV
18 Replies

4. Solaris

Server Mail Issue

Solaris server does not receive email from other servers any more. For example, If we send mail from server A to server B, mail is not reaching server B and there is no message or warning about failure of sending mail in server A. What may be the issue of this? Thankyou in advance!! (1 Reply)
Discussion started by: learner46
1 Replies

5. Solaris

M4000 Server Issue

Dear Team, This time i am facing some problems in Sun SPARC M4000 server. I have a doubt, when we are upgrading the firmware if XSCF , the OBP is also upgraded. What about server OBP, Is that upgardation need to be done separately ? what about DVD-ROM, HARD DISK firmware.... (3 Replies)
Discussion started by: sudhansu
3 Replies

6. UNIX for Advanced & Expert Users

Issue with SFTP from different server by

Hi , I have 2 servers , say Server A and Server B . ssh keys have been exchanged for unix account sftpuser(created on server A) in such a way that A shell script (Script1.Sh) written on Server A can PULL flat files from Server B and save them on server A . Now I am able to execute... (4 Replies)
Discussion started by: MrActionHero
4 Replies

7. HP-UX

Ignite issue on HPUX server

Hi All, I am getting below error while igniting(restoring image) on 2470 server. i tried with different images it is giving same error. please help me out to resolve this issue * Making VxFS filesystem for "/usr/aethos/snss/suppimpapp1", (/dev/vg00/rsuppimpapp1). *... (3 Replies)
Discussion started by: Prabhu H
3 Replies

8. HP-UX

Issue with user logging in to HP UX Server

Hi, I wonder if anyone is able to assist me. I have a HP UX server and some HP UX workstations that has been migrated from another network. I have changed the IP Addresses and everything seems to be working fine. However, the users are complaining that they are unable to login to the UX... (1 Reply)
Discussion started by: michaelgim
1 Replies

9. AIX

NIM Server Issue

Hi, I'm getting the above error while trying to take a MKSYSB image via NIM. I've only just started getting this and don't know why it is failing. Any one got any suggestions? Thanks Kees (3 Replies)
Discussion started by: KeesH
3 Replies

10. AIX

Client/Server Issue

I'm new to the forum and I know just enough about this topic to make me dangerous. This question is probably pretty basic to most of you, but here goes: I've got two servers that I'm connecting to via TCP/IP. The issue is that I'm losing connectivity between the two after a certain period of... (5 Replies)
Discussion started by: geauxtn
5 Replies

Featured Tech Videos