1
vote
2answers
139 views

re-create new link and remove the old link on one command

according to ln manual page: man ln -f, --force remove existing destination files so as I understand if I want to re-create new link to some destination directory/file I can ...
1
vote
2answers
449 views

how to see process status with full details

I run the script - my_script.ksh as process with 5 long arguments on my solaris/linux machine ( example 1 ) , Later I verify the process by ps -ef | grep my_script.ksh I don't understand ...
5
votes
1answer
618 views

What's the difference between “sudo su -” and “sudo -i”? [duplicate]

Possible Duplicate: What is the difference between sudo -i and sudo su - I know both commands result in gaining a root-shell. But there are some differences. On some servers e.g. the prompt ...
10
votes
4answers
19k views

How do I sleep for a millisecond in bash or ksh

sleep is a very popular command and we can start sleep from 1 second # wait one second please sleep 1 but what the alternative if I need to wait only 0.1 second or between 0.1 to 1 ...
0
votes
1answer
86 views

bash + run command in tcsh from bash

when I run from bash shell the command: bash for i in 1 2 3 ; do echo $i ; done 1 2 3 but when I switch to tcsh and want to run: tcsh bash -c for i in 1 2 3 ; do echo $i ; done i: -c: ...
3
votes
2answers
308 views

expect script to support two expected characters

I want to run sshd restart on Linux and Solaris machine via expect ( my expect run in my ksh script ) I create expect script so when expect see the prompt "#" then he run sshd restart but the ...
1
vote
1answer
767 views

script not run after reboot from /etc/rc3.d

I create symbolic link to the file - /etc/rc3.d/platform.bash from /var/tmp/platform.bash ln -s /var/tmp/platform.bash /etc/rc3.d/platform.bash script exist under /var/tmp : ...
2
votes
2answers
302 views

Perl command line + add PATH before string in file

I want to add the PATH - /usr/local/bin/perl befpore string in the file by perl command line ( the perl command line must be in my bash script ) , I have solaris machine the target to add - ...
0
votes
2answers
4k views

expect + how to install expect on solaris

subject - install expect on solaris in order to write expect scripts details from my machine: uname -a SunOS 5.10 Generic_139555-08 sun4v sparc SUNW,Netra-T5220 I installed Solaris machine ( ...
2
votes
2answers
94 views

perl + Match last number in file and reduce it by one

I want to add the following perl command in my bash script please advice how to change (reduce by one ) the last number that start with "+" character in file with perl ? Example of original file ( ...
0
votes
1answer
179 views

Lock down Solaris Shell Changing for normal users

I have a few dozen Solaris(5.10) boxes. By default, they are using ksh as the shell. Only a few users have sudo privileges. The rest do not. I don't want my regular users changing to another shell. ...
2
votes
2answers
978 views

exported variable not persisted after script execution

I'm facing a wierd issue. I've a vm with solaris 11, and trying to write some bash scripts. if, on the shell, I type : export TEST=aaa and subsequently run: set I correctly see a new ...
1
vote
2answers
433 views

BASH_ENV ignored on solaris?

In my .bash_profile, executed for both my interactive and non-interactive logins are BASH_ENV=$HOME/.myinteractivestuff export BASH_ENV doing this for bash on Linux works fine, but on Solaris is ...
5
votes
6answers
2k views

how do I make solaris shell more familiar for a linux user? [closed]

I've been a linux user for years. Very used to the bash shell, used to linux shell key mappings that come with most mainstream distros. I'm also a happy vim user in linux & love my arrow keys. ...
7
votes
6answers
6k views

crontab environment

I have written various scripts to launch Java server applications, which are typically run for 24 hours before being shut down (by invoking the same script with a different parameter). The script ...
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".