Sponsored Content
Top Forums Shell Programming and Scripting Noob to scripting needs some assistance Post 302961518 by jkeeton81 on Monday 30th of November 2015 02:41:27 PM
Old 11-30-2015
Noob to scripting needs some assistance

Hello,

I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below

Prompt the system administrator for all valid input parameters
Generate a menu to ask which task is needed to be performed
Create a UNIX group
Drop a UNIX group
Create a user
Drop a user

Prompt the system administrator for the target user name
List the running processes for that user
Confirm with the system administrator before killing the processes
Kill the processes after confirmation

I understand the commands to create users and groups and to kill processes, but I do not know how to write a scrpt to perform all of this and prompt the admin/generate menus

Any help would be greatly appreciated
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting neophyte needs file manipulation assistance

I need to write two shell scripts for an rsync backup solution. The first script will copy all backed up files into a folder named after the original folder, plus a date stamp (so e.g. if the original folder name is 'foo' and is backed up on the 10th of September, then the backup folder will be... (0 Replies)
Discussion started by: LambdaCalculus
0 Replies

2. Shell Programming and Scripting

Assistance in Perl scripting

PFA file "color.txt". Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand. I am expecting out in the form as specified in second file "out.txt" I need a perl script to perform the task. Thanks in advance. (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

3. UNIX for Dummies Questions & Answers

NOOB - Scripting to make an App work

Hello everyone. i work in a school and i ran into an application today that is a real pickle. i know how to make it work, but i would need to script it. The way to make it work would be to have a script check each local user profile on login, see if the directory already exists, do nothing... (27 Replies)
Discussion started by: jscan
27 Replies

4. UNIX for Dummies Questions & Answers

Noob scripting question with android ADB commands

Hi I'm pretty new to scripting and I've been googling around looking for an answer but have yet to come up with a proper solution. I work with multiple android devices at a time and I'm looking to simplify my life with a script. Basically I'm looking for a script that takes the device ID's and then... (2 Replies)
Discussion started by: Onyoursix
2 Replies

5. Shell Programming and Scripting

Noob to Shell Scripting

Hello. I'm attempting to create a shell script to assist me by saving time with one of my hobbies. I am an Android Enthusiast and currently build a few roms for one of the devices. One of the roms I make is ported from a different device to mine (I get the original for the HTC Desire HD and... (3 Replies)
Discussion started by: JHutson456
3 Replies

6. Shell Programming and Scripting

Using ii for irc chat - scripting assistance?

I am using ii for irc on my pogoplug... hxxp://hg.suckless.org/ii/file/d163c8917af7/FAQ If you look at the bottom of there, it states 31 What other fancy stuff can I do with ii? 32 ---------------------------------------- 33 It is very easy to write irc bots in ii: 34... (3 Replies)
Discussion started by: spartan2006
3 Replies

7. Shell Programming and Scripting

sed newbie scripting assistance

Howdy folks, I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something. Here's a genericized version: A text_file... (3 Replies)
Discussion started by: mthespian
3 Replies

8. Shell Programming and Scripting

Dhcp.config file scripting assistance

Hello everyone! I am brand new at this forum thing and wanted to thank all of you for your time and help in advance for helping me troubleshoot my issue. I am fairly new to shell scripting and scoured the entire internet to find a solution for my issue to no avail and hope you're able to help. ... (2 Replies)
Discussion started by: sedrocks
2 Replies

9. Shell Programming and Scripting

Noob Expect Scripting Question

I'm having some difficulty with convincing Expect to do what I need.. I have a loop that waits for input, a specific phrase of text followed by a single word. I need Expect to capture that word following the specific phrase. It should then store the word in a variable. I'm fairly sure it's... (6 Replies)
Discussion started by: LongLeafTea
6 Replies

10. Shell Programming and Scripting

Total Noob BASH scripting question

Hello All, I have a file of ip addresses called activeips.txt What I'm trying to do is run a simple bash script that has a loop in it. The loop is a cat of the IP addresses in the file. The goal is to run 2 nmap commands to give me outputs where each address in the list has an OS... (11 Replies)
Discussion started by: Dirk_Pitt
11 Replies
TASKS(3PVM)							  PVM Version 3.4						       TASKS(3PVM)

NAME
pvm_tasks - Returns information about the tasks running on the virtual machine. SYNOPSIS
C int info = pvm_tasks( int where, int *ntask, struct pvmtaskinfo **taskp ) struct pvmtaskinfo { int ti_tid; int ti_ptid; int ti_host; int ti_flag; char *ti_a_out; } taskp; Fortran call pvmftasks( where, ntask, tid, ptid, dtid, flag, aout, info ) PARAMETERS
where Integer specifying what tasks to return information about. The options are: 0 for all the tasks on the virtual machine pvmd tid for all tasks on a given host tid for a specific task ntask Integer returning the number of tasks being reported on. taskp Returns pointer to an array of structures which contain information about each task including its task ID, parent tid, pvmd task ID, status flag, and the name of this task's executable file. The status flag values are: waiting for a message, waiting for the pvmd, and running. tid Integer returning task ID of one task ptid Integer returning parent task ID dtid Integer returning pvmd task ID of host task is on. flag Integer returning status of task aout Character string returning the name of spawned task. Manually started tasks return blank. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_tasks returns information about tasks presently running on the virtual machine. The information returned is the same as that available from the console command ps. The C function returns information about the entire virtual machine in one call. The Fortran function returns information about one task per call and cycles through all the tasks. Thus, if where = 0, and pvmftasks is called ntask times, all tasks will be represented. Note that in Fortran the reported value of ntask and the set of tasks do not change until the function resets at the end of a complete cycle. The user can reset pvmftasks() at any time by calling it with ntask = -1. If pvm_tasks is successful, info will be 0. If some error occurs then info will be < 0. EXAMPLES
C: struct pvmtaskinfo *taskp; int i, ntask; info = pvm_tasks( 0, &ntask, &taskp ); for (i = 0; i < ntask; i++) printf("t%x ", taskp[i].ti_tid); Fortran: Do i=1, NTASK CALL PVMFTASKS( DTID, NTASK, TID(i), PTID(i), DTID(i), & FLAG(i), AOUT(i), INFO ) EndDo ERRORS
The following error condition can be returned by pvm_tasks PvmBadParam invalid value for where argument. PvmSysErr pvmd not responding. PvmNoHost specified host not in virtual machine. SEE ALSO
pvm_config(3PVM), pvm_tidtohost(3PVM) 31 August, 1994 TASKS(3PVM)
All times are GMT -4. The time now is 04:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy