Need to check links exists in the server based on that need to run the build script
Hi,
I am working on a build script which will check for the links existing in the server ,then run the gen command to start the build process.
Appreciate help on this.
server os:sun solaris 10.Bash shell
links present in the server location /spa/5.0:
My Aim here is to automate the build script.What is does is first it will search for the links present in the /spa/5.0 directory are proper or not.For example:genver -> sa0_genver_release .This was the actual link should present in the server.
1)Script has to check whether mentioned link exists or not .if not exist ,it should throw a error mess and should create the link.(likewise for all the links)
2)Scritpt has to prompt the message like this
Do you want to create makefile or Do you want to create makefile&build
in case if user selects create makefile option then it has to run the gen -c command
if user selects create makefile&build option it has to run the gen clean all command.
I hope i have mentioned required information.Appreciate your help on this.
Advance thanks for the response.
---------- Post updated at 08:50 AM ---------- Previous update was at 04:37 AM ----------
Any help on this?
---------- Post updated 04-25-12 at 02:26 AM ---------- Previous update was 04-24-12 at 08:50 AM ----------
I have tried following command to find out the links are exist or not.
anyother way of checking it in solaris 10 bash shell?
---------- Post updated 04-26-12 at 02:03 AM ---------- Previous update was 04-25-12 at 02:26 AM ----------
I have tried with readlink() but now luck.it does not exit.
Appreciate any help on it?
Last edited by Franklin52; 04-25-2012 at 04:59 AM..
Reason: Please use code tags for data and code samples
Hi there,
I am sorry to ask that kind of beginner thing, but all the code I found online didnt work for me.
All I want to do is: Check via SSH if a File exists on my webserver. The SSH login has to be with username and password.
So I would be very thankful if somebody could write the line.... (8 Replies)
Hi,
I need to check if a file exists on remote server using expect.
#!/bin/bash
ip_addr=10.10.10.10
user=root
passwd=Help
filename=/root/test
expect -c "
spawn ssh -n -T -o NumberOfPasswordPrompts=3 -o StrictHostKeyChecking=no $user@$ip_addr
expect \"*?assword:*\"
send --... (6 Replies)
Hi everyone,
I am trying to figure out a way to ssh to remote server and check if file exists, and if it doesn't I want to leave the script with an exit status of 5.
I have the following that I am attempting to use, but it is not returning anything:
check()
{
ssh ${SOURCE_SERV} "ls -l... (4 Replies)
Hi,
I am using solaris 10 OS and Bash shell.I am looking for the command to check whether link is exits or not.if not i have to create it
Requirement here is say in the server1 i have a directory /spa/5.0.in that directory there are so many links exist.
Example links:
genver ->... (7 Replies)
Hi,
I am trying to write a script which checks if any file exists with "*.log" or "*.out" in Directory
below is the code
#------------------
path=/abd/xyz/
if ; then
echo "Good"
else
echo "Failure"
fi
#--------------------------
its always going to else part and printing... (8 Replies)
Is there any way to have a script run (either on a web page or a shell script) when new files are put in a folder. E.g we have order response notification XML files uploaded to our server. They are uploaded via sftp. What i wondered if there was some way to monitor the contents and if new files... (4 Replies)
guys,
I am trying to write a script that does the following:
it looks for a file in a specific directory and if the file is not there (NOT), it emails me. I have tried the following but its not working. It simply hangs up. Please help.
if
then
mail -s 'blah blah blah' my email... (4 Replies)
Hi All,
working on AIX 5.3.
Requirement is:
Shell script in ksh to check if any file exists in 4 folders as below:
1. /FILE/INB/INT1
2. /FILE/INB/INT2
3. /FILE/INB/INT3
4. /FILE/INB/INT4
Thanks a lot for your time!
a1_win. (3 Replies)
Hi friends..
I hav a problem....
I dont know how to check .c files exists r not in a folder using IF in C shell script
actually i tried like this
if(=~ *.c)
even though some .c files or there in the current folder..it is not entering int o the if control statement...... (17 Replies)
Hi All,
I am new to shell scripting.
Can someone let me know, how to check whether the user exists in the remote system?
I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system .
how to do this ?... (1 Reply)