0
votes
2answers
213 views

running a remote shell script that switches to a user does not return to the issuing local server shell

When I run a script such as this: ssh -t root@10.10.10.10 '/tmp/somescript.sh' where the script is defined as: #!/bin/sh mkdir -p /data/workday/cred chown -R myuser:myuser /data su myuser - # ...
0
votes
1answer
55 views

date and other commands no longer working in sh script

I have a shell script that used to run find on Ubuntu 10.04 but since I have moved to 12.04 it doesn't work as before throwing the following messages: /home/checks.sh: 1: /home/checks.sh: date : not ...
1
vote
4answers
133 views

How to execute shell scrips without creating files

How is it possible to execute a shell script without creating a file? For example assume I have the following script (testscript): #!/bin/bash function run_free() { free -m } run_free I then of ...
1
vote
1answer
67 views

Does the sh command use the users shell

Does the sh linux command use the users current shell, even if its not bash? For example, let's say the user bob is running csh. If I create a script with functions and csh and try and execute it ...
0
votes
1answer
79 views

Directory replication in New server

Scenario is to replicate all the directories,sub-directories,files,symbolic links present in Linux development Server to Linux QA Server. Lot of unix users also to be created. Consider an unix ...
1
vote
2answers
790 views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
2
votes
1answer
1k views

Freebsd: How to change default shell?

The default shell in freebsd is SH and I really can't stand it: autocomplete is very limited, and rehash commands kill me. I feel like a one armed and one legged man... How can I change the shell ...
0
votes
3answers
468 views

Error when changing shell of root user in Solaris 10

I can't change my shell for root in Solaris 10. When i change, i can't login again after logout. The error is "no shell".
3
votes
1answer
2k views

AIX update environment after .profile change

I am running AIX 5.3. I have made changes to a user's .profile file (added a couple of environment variables). Is there a command that I can use to re-process the .profile file for a particular ...