Sponsored Content
Full Discussion: Writing Own Minishell!
Top Forums Programming Writing Own Minishell! Post 87317 by krhamidou on Saturday 22nd of October 2005 10:49:05 AM
Old 10-22-2005
you could also study the sourcecode of others shells ( zsh , ksh, ash, and so on...)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help for writing a script

Hi, I need help writing a unix script to change the time in the server automatically when it reaches a specified time. Only on the 14th of april, when the time becomes midnight (00:00:00), I need the server to change the time automatically to 23:30:00 and start working on as usual with a... (2 Replies)
Discussion started by: amodha
2 Replies

2. Shell Programming and Scripting

Writing to a file in different way

HI all, If I have 3 lines in variables such as follows x=Unix Forum y=Interactive Forum z=Unix Forum is Best Forum Now I want to write these 3 lines in a file so that that file will look like Unix Forum Interactive Forum Unix Forum is Best Forum How can I do it ? ... (4 Replies)
Discussion started by: dhananjaysk
4 Replies

3. Shell Programming and Scripting

writing scripts

What would happen if I didn't use "./" before writing a script? (4 Replies)
Discussion started by: ebethea27703
4 Replies

4. UNIX for Dummies Questions & Answers

writing a program

i have written a very simple program in the vi editor, how do i now make it an executable file? (3 Replies)
Discussion started by: carlvernon
3 Replies

5. Shell Programming and Scripting

Writing to another file

Hi, I have 2 unix files. I have to write all the information in the 2nd file to the 1st file at the end of the 1st file. What is the command for that. Pl tell me ASAP. Thanks (3 Replies)
Discussion started by: dreams5617
3 Replies

6. Shell Programming and Scripting

writing to a file

Hi All. I have the following simple shell program. It reads a number from the "/user/amit/bldno"; for example: file "bldno" contains value "100" After execution of the program the content should change to 101. --------- #!/usr/bin/tcsh V= `cat /user/amit/bldno` echo $V `rm -rf ... (1 Reply)
Discussion started by: amitrajvarma
1 Replies

7. Shell Programming and Scripting

Help in writing a script

Hey everyone Can anyone please write me a script to display numbers in descending order dynamically i.e if the user enter a number say 100 then the output should be like 100 99 ....so on till 0 I tried using the logic as for ((i =1; i<=100; i--) but the it goes into a infinite loop since even the... (7 Replies)
Discussion started by: icchi
7 Replies

8. Shell Programming and Scripting

Writing a File

#!/bin/bash ARCHIVE="$PWD" #ARCHIVE="/home/kschmidt/public_html/Files/DrMathArchive" NUMBERofDIRS=0 TEST="" for dir in `ls -l ${ARCHIVE}| egrep '^d' | awk '{print $9}'`; do for EACHFILE in `find ${ARCHIVE}/${dir} -type f -name "prob*" ` do ... (2 Replies)
Discussion started by: football12345
2 Replies

9. Shell Programming and Scripting

Writing a Startscript

I hope I have found the perfect place for my problem ... I have a dedicated server with some minecraftservers (java) which are connected via a Bungeecord on it. These all have a start.sh which looks in its folder like this: screen -A -m -d -S SERVERNAME java -jar -Xmx2048M -Xms2048M... (10 Replies)
Discussion started by: Spongebob
10 Replies

10. Shell Programming and Scripting

Not writing output

In the attached bash in the convert function the out_position.txt in not being writing to the annovar directory and I can not figure out why. Thank you :). (2 Replies)
Discussion started by: cmccabe
2 Replies
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/ksh93 /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/ksh93 /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/sfw/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. NOTES
Restricted shells should not be listed in /etc/shells. SunOS 5.11 1 Nov 2007 getusershell(3C)
All times are GMT -4. The time now is 04:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy