Sponsored Content
Homework and Emergencies Homework & Coursework Questions Unix Shell Script to prompt customer for name etc Post 302464573 by SQLScript on Wednesday 20th of October 2010 12:44:29 PM
Old 10-20-2010
zaxxon asked:

Next step will be to think about how you will retrieve this info stored in that text file - there are several options how to do that. What field or string should be able to be searched for - how will the result be displayed etc. ie. should all infos be displayed or only some.

Reply:
Name, age and address should be displayed.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to change shell and prompt

I want to write a shell script which will change the current shell (say from csh to bsh) and my Prompt (say my name) as desired.pls help (1 Reply)
Discussion started by: SHYAM
1 Replies

2. UNIX for Dummies Questions & Answers

identify a customer under a UNIX server

Like many UNIX users, there is a small team that is connected to UNIX (under the same UNIX user) via putty from a Windows PC. Is there a way, once under UNIX, to know the address of the originating computer or anything that can differentiate initial users ? (7 Replies)
Discussion started by: popescu1954
7 Replies

3. AIX

echo in alias for Unix C-Shell Prompt

Hi, I want to set Unix prompt in C-Shell which required the break new line using alias. Ex. hostname : username : %> Now, it will be setup in .login file with alias alias cd 'cd \!* | set prompt="`hostname` : $USER : %>"' I'm unable to parse echo command or break which I can get %>... (1 Reply)
Discussion started by: buzzusa
1 Replies

4. Shell Programming and Scripting

echo in alias for Unix C-Shell Prompt

Hi, I want to set Unix prompt in C-Shell which required the break new line using alias. Ex. hostname : username : %> Now, it will be setup in .login file with alias alias cd 'cd \!* | set prompt="`hostname` : $USER : %>"' I'm unable to parse echo command or break which I can get %>... (3 Replies)
Discussion started by: buzzusa
3 Replies

5. Shell Programming and Scripting

Shell Script to prompt customer for name etc

How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following: name, age, address, phone number, product, price range. Thanks (1 Reply)
Discussion started by: SQLScript
1 Replies

6. UNIX for Dummies Questions & Answers

Shell Script to prompt customer for name etc

reposting How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following: name, age, address, phone number, product, price range. Thanks (1 Reply)
Discussion started by: SQLScript
1 Replies

7. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

8. Homework & Coursework Questions

Shell Script Password Prompt

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to write a shell script that prompts the user for the password which is "lux" once the correct password... (4 Replies)
Discussion started by: Emin_Em
4 Replies

9. UNIX for Beginners Questions & Answers

Noob. shell script with prompt?

Hey Guys and Gals, Im a complete Noob to Unix. But recently have started working on a unix system for my PET/CT scanner. My scanner comes with a MOD drive for backup. I would like to back up to USB (its alot cheaper). But the only way to do so is by manually enterin the unix commands. Id like to... (13 Replies)
Discussion started by: TorresGXL
13 Replies
MKSTEMP(3)						     Linux Programmer's Manual							MKSTEMP(3)

NAME
mkstemp - create a unique temporary file SYNOPSIS
#include <stdlib.h> int mkstemp(char *template); DESCRIPTION
The mkstemp() function generates a unique temporary file name from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the filename unique. The file is then created with mode read/write and permissions 0666 (glibc 2.0.6 and earlier), 0600 (glibc 2.0.7 and later). Since it will be modified, template must not be a string constant, but should be declared as a character array. The file is opened with the O_EXCL flag, guaranteeing that when mkstemp returns successfully we are the only user. RETURN VALUE
The mkstemp() function returns the file descriptor fd of the temporary file or -1 on error. ERRORS
EINVAL The last six characters of template were not XXXXXX. Now template is unchanged. EEXIST Could not create a unique temporary filename. Now the contents of template are undefined. NOTES
The old behaviour (creating a file with mode 0666) may be a security risk, especially since other Unix flavours use 0600, and somebody might overlook this detail when porting programs. More generally, the POSIX specification does not say anything about file modes, so the application should make sure its umask is set appro- priately before calling mkstemp. CONFORMING TO
BSD 4.3, POSIX 1003.1-2001 NOTE
The prototype is in <unistd.h> for libc4, libc5, glibc1; glibc2 follows the Single Unix Specification and has the prototype in <stdlib.h>. SEE ALSO
mkdtemp(3), mktemp(3), tmpnam(3), tempnam(3), tmpfile(3) GNU
2001-12-23 MKSTEMP(3)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy