Sponsored Content
Full Discussion: Bourne Shell Script
Top Forums UNIX for Dummies Questions & Answers Bourne Shell Script Post 44750 by oombera on Wednesday 10th of December 2003 11:25:33 AM
Old 12-10-2003
If that list of names is stored in a variable, say nameList, you could use a simple loop:
Code:
for i in $nameList; do
 echo $i
done

If it's in a file, try:
Code:
while read LINE; do
 for i in $LINE; do
  echo $i
 done
done < yourFile

---------
or there's Ygor's simplified suggestion Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Bourne shell script need help please ?

i have this assignment.. and i mad this script but there is something wrong with it.. if anyone can tell me.. watz going on... i would appreciate it.. tHnX in advance.. count=1 val=$2 op=$1 ans=0 if then if then while do ... (7 Replies)
Discussion started by: dezithug
7 Replies

2. Shell Programming and Scripting

bourne shell script

Hi all, Can somebody answer the following query Thanks, Srinivas A shell program that takes one or any number of file directory names as input; sorts the directories given as parameters jointly in the ascending or decending order of choice For EX : dips abc etc desc will sort the files... (2 Replies)
Discussion started by: psrinivas
2 Replies

3. Shell Programming and Scripting

Trouble using substr function with Bourne shell script

Hi, I'm a newbie to UNIX scripting and I'm having some trouble compiling my script. I'm using the Bourne Shell and cannot seem to use the substr function correctly. I'm trying to extract the last two digits of a year that's stored in a variable based off of a condition. I've searched the... (4 Replies)
Discussion started by: E2004
4 Replies

4. Shell Programming and Scripting

cd from a Bourne Shell Script - Please Help

Dear Bourne Shell Expert, I am trying to change the current working directory from within a Bourne Shell script. Simply enough i thought ! As I am sure you are well aware, Inside the script i echo `pwd` and it seems ok, but the shell spawns another shell to execute this and as such, when my... (10 Replies)
Discussion started by: fawqati
10 Replies

5. Shell Programming and Scripting

Bourne: How to invoke an alias from within a shell script

Bourne: How to invoke an alias from within a shell script If I type in the alias in the command line, it runs If I insert that same alias into my shell script and run the shell script, the alias is not invoked. Help please. (2 Replies)
Discussion started by: techshots
2 Replies

6. Shell Programming and Scripting

Bourne Shell script - log for users loggin on and off

Hello all, I'm new to shell scripting and want to make a script that I can write to log the users logging on and off the a unix system. I have had a good look over the past few days to crack it, I think I am getting close. I want a script that runs an infinite loop to check every 5 seconds... (14 Replies)
Discussion started by: noodlesoup
14 Replies

7. Shell Programming and Scripting

help with bourne shell script

Attempting to write a script to eventually notify me via email for when there is packetloss across the backbone. I am looking for values greater than 0% in the mtr field. #!/bin/sh target=www.google.com date +"%D"_"%T" >> /home/rich/mtr.log echo "----------------------------------------" >>... (1 Reply)
Discussion started by: closedown
1 Replies

8. Shell Programming and Scripting

bourne shell script error on line containing declare...

Hi, Get the following error when running a shell script with following statement. Syntax error at line 150 : `(' is not expected 150: declare -a VPO_SEV=(Normal Warning Minor Major Critical) it runs fine using bash, so I guess the script should be using bash but is there a... (1 Reply)
Discussion started by: wilsonee
1 Replies

9. Shell Programming and Scripting

Open a file from within a Bourne shell Script

I am suppose to make a program that cuts the extension off of a file. It uses that .ext to decide which program needs to be used to open the file. This only finds the name of the program from a list of programs I made. My problem is when it has the name of the program it needs to use, how can I... (3 Replies)
Discussion started by: dordrix
3 Replies

10. Homework & Coursework Questions

New user needs help with bourne shell script

This is my question, below the question is the template Write and execute a Bourne shell script called homework that will From within the script, create three background processes: a) (2 points) one that saves a long listing of your hidden files to a file named hiddenlist b) (2 points) ... (4 Replies)
Discussion started by: luislozoya
4 Replies
TURNIN(1)						      General Commands Manual							 TURNIN(1)

NAME
turnin - submit assignments to be graded SYNOPSYS
turnin [ OPTIONS ] -c [ course-name ] files DESCRIPTION
Submits assignments to be graded. We submit to the default project if it is not specified as an option. REQUIRED ARGUMENTS
-c, --course Sets the course to which we'll submit our assignments. files A list of files we wish to submit. They will be compressed using tar(1) and gzip(1) formats before being copied to the submission directory. OPTIONS
--version Print turnin's version -h, --help Print a help message -l, --list Prints a list of projects, along with whether or not they are enabled and shows which project is the default project. -p, --project Sets the project to which we'll submit our assignments. -C, --config Path to an alternate configuration file -v, --verbose Prints a list of submitted files once they have been submitted. -k, --keyid Cryptographically signs an assignment using gpg(1) -w, --legal Print warranty and license information. EXAMPLES
turnin -c world-cheeses --list List the projects in the course world-cheeses. turnin -c world-cheeses stilton-recipe Submit the file stilton-recipe to the default project in the course world-cheeses. turnin -c world-cheeses -p stilton stilton-recipe Submit the file stilton-recipe to the project stilton in the course world-cheeses. FILES
/etc/turnin-ng.cf ~/.turnin-ng/submissions SEE ALSO
turnincfg(1) The full documentation for turnin is maintained as a Texinfo manual. If the info and turnin programs are properly installed at your site, the command info turnin-ng should give you access to the complete manual. AUTHOR
Turnin-NG and this manpage were written by Ryan Kavanagh <ryanakca@kubuntu.org> in the summer of 2009 and are still actively maintained. Turnin-NG is a replacement for the 'project' and 'turnin' commands written in 1990 for the SPARC architecture by an unknown author. Both Turnin-NG and this manpage are distributed under the terms of the GNU General Public License version 2, or (at your option) any later version. Turnin-NG SEPTEMBER 2010 TURNIN(1)
All times are GMT -4. The time now is 01:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy