cd command in shell application

Thread Tools Search this Thread
Top Forums Programming cd command in shell application
# 1  
Old 10-27-2009
cd command in shell application


I'm making an application that manages and executes commands unix shell does. The program can execute single commands except the cd. The commands are executed with execvp and it seems that the problem must be with this function and the current working directory.

Could someone help me?

# 2  
Old 10-27-2009
cd is a command that absolutely must be a shell builtin. No other process can change your shell's current directory for you, it has to make the system call itself. See man 2 chdir.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Run an application in shell script

I run the following command using the command line. I need to run the same command in shell script : ./sas.server start start is a parameter that passes to start.server to startup services within start.server. the path to sas.server is /path/Lev1 Here is my code: #!/bin/sh set... (3 Replies)
Discussion started by: dellanicholson
3 Replies

2. Shell Programming and Scripting

How to execute application command in shell script?

friends, i have application commands to execute in shell script it is something like this. i will login with user data it takes me to $ prompt. Example given below login: data ps : xxxx $ MNSinput --this takes me to greater than prompt > > ops --this is command i enter this output... (7 Replies)
Discussion started by: udaykrishna
7 Replies

3. Shell Programming and Scripting

Invoking Application in Shell Script

Hi All, I have a scenario : 1. A list of servers naming server21, server 22, server 23 etc. This list of servers is separate for my environments. Env1 has 3 server Env2 has 5 serves Env3 has 10 servers 2. Each server accesses application through which I want to invoke some method. So... (7 Replies)
Discussion started by: ankur328
7 Replies

4. Shell Programming and Scripting

Provide Password using to the application using the shell script

Hello, I have a requirement to shut down and start up my application on different environments (Dev, QA and Prod). I have around 24 servers. I have to login to each server manually for shutinng down the application. I wrote a shell command on each server and I am invoking those shell... (2 Replies)
Discussion started by: GDSR Raju
2 Replies

5. Shell Programming and Scripting

Shell scripting for application deployment

hi all, i want script for this one 1. Download the zip from the ftp 2. Take backup of the current application 3. Deploy the zip in webapps Unzip the file. 4. Configure DB values. 5. Restart tomcat Thanks Advance, janny. (1 Reply)
Discussion started by: mohan999999
1 Replies

6. Shell Programming and Scripting

command to get application name

If typing lsof -i :80 , I get the name as *:http (LISTEN) and some othr like this. what command is to get the exact application name like mozzilla firefox or lotus notes or like that (2 Replies)
Discussion started by: satheeshkr_cse
2 Replies

7. Shell Programming and Scripting

command to know the application running of the port

Hi, is there any command to findout that which application is using the particular port. or whether any port is occupied with the specfic process id ? (4 Replies)
Discussion started by: mail2sant
4 Replies

8. UNIX for Dummies Questions & Answers

Uninstall an Application with Command Line

Hello everyone, I am new to UNIX and computers in general. However I recently started using the command line, and I have to say that it's a blast. It's so much fun to learn all these things, and it's quite handy too. I'm running Mac OS 10.5.8 and I want to uninstall an application that I... (5 Replies)
Discussion started by: HoldenCaulfield
5 Replies

9. Shell Programming and Scripting

Starting application using shell scripts

Hi All, I want to write a shell script which will start some application lets say "Windows media player". Please let me know your inputs. Thanks in advance, Niyati (0 Replies)
Discussion started by: Niyati
0 Replies

10. Shell Programming and Scripting

Start and stop of an application thru shell scripts.

Hi, I just learnt the shell scripting and got working on that right now. I have one problem. Here i am having a java application that needs to be start and stop using two shell scripts, i.e., starting the java application using one shell script and stopping the application using another... (1 Reply)
Discussion started by: sadha
1 Replies
Login or Register to Ask a Question