9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
#! /bin/ksh
#first.sh
echo "b4 set exit as return"
alias exit=return
echo "call second"
. ./second.sh
echo "after second"
#. ./third.sh
unalias exit
echo "ho lanciato il terzo"
=================//
#second.sh
echo "in scond"
exit
==============//
the above code works in k... (2 Replies)
Discussion started by: mprakasheee
2 Replies
2. Shell Programming and Scripting
Hi,
I am looking for a shell script which serves the below purpose.
Please find below the algorithm for the same and any help on this would be highly appreciated.
1)set of strings need to be replaced among set of files(directory may contain different types of files)
2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies
3. Shell Programming and Scripting
I have tried with the following:
csh -c 'source ~/.cshrc; exec bash' # works perfectly
(cat ~/.cshrc; echo exec bash) | csh # not working
And, using sed, I successfully retrieved the environment variables from ~/.cshrc
sed -rn 's/setenv\s+(\S+)\s+(.*)$/export \1=\2/p' ~/.cshrc
but now... (6 Replies)
Discussion started by: royalibrahim
6 Replies
4. Shell Programming and Scripting
My manager required that i keep the hostnames and username and password in a separate file when creating my sftp script.
(Don't mention passwords and sftp...I've talk to him about this several times)
I have a list of hostnames that have to be read in a loop in my main script.
I don't know... (3 Replies)
Discussion started by: MJCreations
3 Replies
5. Shell Programming and Scripting
Hi ,
I am new to shell scripting. i have a requirement say i will receive a file in a directory say /xyz.if that file stays in that directory more than 30 min i need to get a mail to my outlook.this should run for every 20 min in crontab.
can anyone help me? (8 Replies)
Discussion started by: muraliinfy04
8 Replies
6. Shell Programming and Scripting
I am running on AIX 5.3. I have a remote AIX server running on a generator. Many times the generator goes out and I only have a window of 15 mins with the network up and 30 mins the server is powered. I need help creating a script using ifconfig, where it goes out and checks the network every 5... (2 Replies)
Discussion started by: AIX25
2 Replies
7. Shell Programming and Scripting
Hi All,
I've searched through the forum for a solution to this problem, but I haven't found anything. I have 2 script files that are in different directories.
My first script, let's call it "/one/two/a.sh" looks like this:
#!/bin/sh
IN_DIR=`dirname $0`
CUR_DIR=`pwd`
cd $IN_DIR... (4 Replies)
Discussion started by: mrbluegreen
4 Replies
8. UNIX for Dummies Questions & Answers
I have a script "abc.sh" in /tmp which has exit 0 as its last line
when I run this script from /tmp/xyz/def.sh script as
. ../abc.sh
then the script executes but the control doesn't return to def.sh script for subsequent commands in def.sh
but if I invoke the abc.sh from inside the... (3 Replies)
Discussion started by: rakeshou
3 Replies
9. Shell Programming and Scripting
Hi All
How can I set password in linux.It is OK if it display password in plain text in script.
manually i can set:
#passwd
Changing password for root
Enter new password:
Bad password: too weak.
Re-enter new password:
Password changed.
#
I want this to be done by script.Please let me... (2 Replies)
Discussion started by: tannu
2 Replies