10 More Discussions You Might Find Interesting
1. Red Hat
I'm running CentOS 6.8 and use bash. I would like a warning to appear to the user who runs the command "service httpd restart"
E.g.
# service httpd restart
are you sure y/n
n
#
(or if y, the command executes).
I looked into it a little but am not sure of the best approach. Aliases I... (2 Replies)
Discussion started by: spacegoose
2 Replies
2. Shell Programming and Scripting
Hi,
This is a script which to create an opvn user, I want which answer automatically to a certain part so, I try this, it works without the red part but I must type manually.. :
#!/bin/bash
## Environnement ##
LC_ALL=C
## Paths ##
rsa_dir="etc/openvpn/easy-rsa"... (10 Replies)
Discussion started by: Arnaudh78
10 Replies
3. Shell Programming and Scripting
Hi all,
i have to sftp a file to another server
I don't have "expect" or sshpass on my machine its solaris 10,
i want to pass password in command line or
after doing this
sftp user@server how to automatically provide the password as input ( stored in some variable or so)
... (1 Reply)
Discussion started by: zozoo
1 Replies
4. Shell Programming and Scripting
Dear All,
I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times.
thanks
rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies
5. Shell Programming and Scripting
Hi,
I am executing below script
s1=`pwd`
s2=/space
if
then
echo "done"
else
echo "mistake"
cd /tmp
fi
I am not able to migrate to /tmp directory if the condition is not true.However mistake is being printed.Means cd command is not working here.All other commands except cd are... (3 Replies)
Discussion started by: d8011
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a commands in a file called commands.file, I am using this file with the following commnad
xterm -e "commands.file"
After executing this file in the new xterm, it is closing automatically.
I want to use that xterm after that.
Please help me regarding this?
:)
... (4 Replies)
Discussion started by: chaitubek
4 Replies
7. Shell Programming and Scripting
i have installed vmware on a text base linux node
now i have to vmware-configure.pl to do the initial configuration
now 1st step it askes for agreeing for a " License Agreement"
for that i have to say "q" and "yes" to Accept it
i want to run a script with does these 3 steps... (6 Replies)
Discussion started by: pbsrinivas
6 Replies
8. UNIX and Linux Applications
I have a shell script. In this script I executes various command and my requirement is such that if any command fails I've to terminate the shell script.
To achieve this objective I'm checking the value of $? after each command and if its value is greater thaen I 'exit' the script.
Is there... (2 Replies)
Discussion started by: ashok2008
2 Replies
9. Shell Programming and Scripting
Hi friends,
I need to write a script which runs a command (on that particular server only) after every 10 mins, and the contents are also echoed on that very terminal only.
And then I need to compare the last two outputs, and mail if there is any difference in the last two outputs.
Can we set... (4 Replies)
Discussion started by: vikas027
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need to execute the following unix command through my java code -
zip -e
When i execute this command from the command prompt, i am prompted for a password in the following manner -
Enter password:
Verify password:
Is it possible to provide the password inthe first command itself... (5 Replies)
Discussion started by: jacob23
5 Replies