Simple shell running with exec family


 
Thread Tools Search this Thread
Top Forums Programming Simple shell running with exec family
# 1  
Old 04-04-2019
# Erroneous question, so can be removed.

# Erroneous question, so can be removed.

Last edited by beginnerboy; 04-05-2019 at 06:17 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Working of exec family of functions

Hi, I am studying exec family of functions.Its man page says,it replaces the current process image with a new process image. If it replaces the binary,then after returning back,how does it get the previous parameters of the process which called exec?As replacing process image means replacing... (5 Replies)
Discussion started by: Radha.Krishna
5 Replies

2. Programming

Working of exec family of functions

Hi, I am studying exec family of functions.Its man page says,it replaces the current process image with a new process image. If it replaces the binary,then after returning back,how does it get the previous parameters of the process which called exec?As replacing process image means replacing all... (1 Reply)
Discussion started by: Radha.Krishna
1 Replies

3. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

4. Shell Programming and Scripting

Simple Script to Check running Process

#!/bin/sh CHECK='ps aux | grep start.jar | grep -v grep | wc -l' if then /usr/local/jre-1.7.0/bin/java - jar start.jar & else fi Could anybody advise whats up with this code im trying to put this in as a cron job to check that solr search engine is running every 10secs and if... (10 Replies)
Discussion started by: will_123
10 Replies

5. Programming

help me understand exec() family of calls...

how does exec() do it? on successful call of exec() family of functions, they never return... how to i emulate that. assume the standard example, execl("/bin/ls","ls",NULL); now this would never return. i m trying to emulate exec()'s never to return feature... #include<unistd.h>... (4 Replies)
Discussion started by: c_d
4 Replies

6. Shell Programming and Scripting

how to use exec command in C shell

i have a script where i am reading some lines from a file into another file.. script works fine in bash.. #!/usr/bin/csh awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1 awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2 exec 10<io... (1 Reply)
Discussion started by: npatwardhan
1 Replies

7. OS X (Apple)

Address family not supported by protocol family

Hi, I compiled with no error a C program, than I tryed to execute it and than I get this error: connessione al server fallita: Address family not supported by protocol family What does it mean? Why I get this error only on Mac os x while on Ubuntu the program works? The code is:... (3 Replies)
Discussion started by: DNAx86
3 Replies

8. Shell Programming and Scripting

Need Help Running a simple script

The following works: $ zgrep "TIME *0 *3 *10 " /opt/oss/report.gz | sed -e "s/ */ /g" 24659 TIME 0 3 10 OWNER 0 8 1 I need to queary over 1000 records, so I try: for b in $(cat /home/user/file | awk '{print $3,"*"$4,"*"$5,"*"$6" "}' | sed 's/^/"/' | sed 's/$/"/') do zgrep $b... (2 Replies)
Discussion started by: tony3101
2 Replies

9. UNIX for Dummies Questions & Answers

need to restrict program exec and running

I'm on Freebsd 4.5 stable, havin question of that kind: I need to restrict programs running, like BitchX for example, which can be dowlnoaded by logged on user, and i cant set permissions to all users to prevent that program from executing. And ipfw doesnt help me because of i need to allow that... (1 Reply)
Discussion started by: hachik
1 Replies
Login or Register to Ask a Question
chsh(1) 						      General Commands Manual							   chsh(1)

NAME
chsh - change default login shell SYNOPSIS
login-name [shell] login-name [shell] login-name [shell] login-name [shell] DESCRIPTION
The command changes the login-shell for a user's login name in the repository (see passwd(1)). The DCE repository is only available if Integrated Login has been configured; see auth.adm(1M). If Integrated Login has been configured, other considerations apply. A user with appropriate DCE privileges is capable of modifying a user's shell; this is not dependent upon superuser privileges. If the repository is not specified (as in [login-name]), the login shell is changed in the file only. Run after running to make sure the information was processed correctly. Notes The command is a hard link to the command. When is executed, actually the command gets executed with appropriate arguments to change the user login shell in the repository specified in command line. If no repository is specified, the login shell is changed in the file. Arguments login-name A login name of a user. shell The absolute path name of a shell. If the file exists, the new login shell must be listed in that file. Otherwise, you can specify one of the standard shells listed in the getusershell(3C) manual entry. If shell is omitted, it defaults to the POSIX shell, Options The following option is recognized: Specify the repository to which the operation is to be applied. Supported repositories include and Security Restrictions You must have appropriate privileges to use the optional login-name argument to change another user's login shell. NETWORKING FEATURES
NFS File can be implemented as a Network Information Service (NIS) database. EXAMPLES
To change the login shell for user to the default: To change the login shell for user to the C shell: To change the login shell for user to the Korn shell in the DCE registry: WARNINGS
If two or more users try to write the file at the same time, a passwd locking mechanism was devised. If this locking fails after subse- quent retrying, terminates. AUTHOR
was developed by HP and the University of California, Berkeley. FILES
SEE ALSO
chfn(1), csh(1), ksh(1), passwd(1), sh(1), sh-posix(1), getusershell(3C), pam(3), passwd(4), shells(4). chsh(1)