10-09-2014
Bash Programming. Could anyone help me?
Hi! I'm new in bash programming and I need to make an script that reads a txt file line by line (every line is like "Name;FirstLastName;SecondLastName;Sex") and has to give every student 3 random marks, its average and add a counter if they are male/female and if they passed. I've been trying with the "read while" function but i don't know how to do the script. Could anyone help or explain me how it works or how should I do this? I would be very grateful.
Post Edition: Output needs to be a new txt, not the same.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all....
I was wondering if there is a lot of differences between /bash and ksh programming.
Im learning about bash programming, but all what I had read in this forum, points me to learn more about ksh over bash. Is that right and why?
Unfortunately, I can’t write ksh progs on my work,... (2 Replies)
Discussion started by: TARFU
2 Replies
2. Shell Programming and Scripting
how to i grep a keyword which ignore upper case or lower case.
for an example :
user enter CoUcH
and the grep also can grep couch which in text.txt although upper or loever case is different .. how to do that ?
any idea? (1 Reply)
Discussion started by: CheeSen
1 Replies
3. Shell Programming and Scripting
Write a Shell script to analyse the disk usage of students in a particular class.
The program should allow the user running the script to input the particular class name (group name) as an argument to the script.
The script should create a file called “logfile” in the home directory of the user... (2 Replies)
Discussion started by: bumdeal2
2 Replies
4. Shell Programming and Scripting
how do you allow a user to input a particular group name as an argument??
thnx for your time. (2 Replies)
Discussion started by: bumdeal2
2 Replies
5. Shell Programming and Scripting
I have inherited a C++ program which does not manage it's memory at all. It has a whole bunch of 'new' variables without many deletes. I believe it was the programmers intent to let the OS clean up.
Correct me if I am wrong, but I believe the unix/linux systems clean up after the program... (1 Reply)
Discussion started by: JDKunk
1 Replies
6. Shell Programming and Scripting
I am going through the examples in the book "Pro Bash Programing" which is quite a good book on bash programing. Just a word of warning about the example script called sa that simply shows command line arguments. In CentOS 5.5 there is a program called sa already on the system. Boy did that throw... (0 Replies)
Discussion started by: simusphere
0 Replies
7. Shell Programming and Scripting
Hello all;
I have little knowledge of bash programming, and I was wondering if you could help me out.
I would like to create a bash script, as detailed below.
process.sh is the bash script itself
list.dl is a text file. In this text file, the first line is the directory from... (1 Reply)
Discussion started by: tehalexf
1 Replies
8. Homework & Coursework Questions
Please take a look I am stuck on step 4
1. The problem statement, all variables and given/known data:
#!/bin/bash
### ULI101 - ASSIGNMENT #2 (PART A) - DUE DATE Wed, Aug 3, 2011, before 12 midnight.
###====================================================================================
###... (13 Replies)
Discussion started by: almirzaee
13 Replies
9. Shell Programming and Scripting
Hi All,
I need to place a ctrl-c interrupt in a bash script, there is no other way, it has to be done :)
can someone please advise how would I go about this?
i want to use ctrl c in below code, after the code excution of just 1 min or 1sec
java Cspsamp 111.19.5.172 7025 rd1... (6 Replies)
Discussion started by: aish11
6 Replies
10. Shell Programming and Scripting
I am going to provide a chunks of codes that I do not understand. Please help with them in a layman's terms.
1) ${DEBUG:-0}
--------------------------------------------------------------------------
2) print "${1}"
... (7 Replies)
Discussion started by: lg123
7 Replies
LEARN ABOUT DEBIAN
event2vrule
EVENT2VRULE(1) General Commands Manual EVENT2VRULE(1)
NAME
event2vrule - adds 'events' to rrdtool graphs
SYNOPSIS
event2vrule <params>
DESCRIPTION
Adding Events to Graphs
There is a new graphing feature which allows you to specify events that should be displayed in your graphs. These events are simply a list
of points in time at which something of interest occurred.
For instance, one could create a plain text file in the graphs directory called events.txt containing these lines:
2001/02/10 1538 added support for events to FlowScan graphs
2001/02/12 1601 allowed the events file to be named on make command line
Then to generate the graphs with those events included one might run:
$ make -f graphs.mf events=events.txt
This feature was implemented using a new script called event2vrule that is supplied with FlowScan. This script is meant to be used as a
``wrapper'' for running rrdtool(1), similarly to how one might run nohup(1). E.g.:
$ event2vrule -h 48 events.txt rrdtool graph -s -48h ...
That command will cause these VRULE arguments to be passed to rrdtool, at the end of the argument list:
COMMENT:
VRULE:981841080#ff0000:2001/02/10 1538 added support for events to FlowScan graphs
COMMENT:
VRULE:982015260#ff0000:2001/02/12 1601 allowed the events file to be named on make command line
COMMENT:
SEE ALSO
add_ds.pl(1), add_txrx(1), flowscan(1), ip2hostname(1), locker(1)
AUTHOR
This manual page was written by Anibal Monsalve Salazar, for the Debian Project.
EVENT2VRULE(1)