473,799 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about shell script

9 New Member
hi
Im new to shepp script. I would like to ask how can I display a list of students in my class
Mar 28 '08 #1
2 1499
gpraghuram
1,275 Recognized Expert Top Contributor
hi
Im new to shepp script. I would like to ask how can I display a list of students in my class
echo "do u want to dsiplay the students"
readline input
then depending on the value of the input you can deceide what to do

Raghuram
Mar 30 '08 #2
kaarthikeyapreyan
107 New Member
hi
Im new to shepp script. I would like to ask how can I display a list of students in my class
if the list of names of students in your class are in a file this is wat u can do is

Expand|Select|Wrap|Line Numbers
  1. echo 'Do you want to display the list of students(y/n)'
  2. read flag
  3. if [ flag = y ]
  4. then
  5. cat (your_file_containing_names)
  6. else
  7. exit 1
  8. fi
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2031
by: Jan Danielsson | last post by:
Hello all, How do I make a python script actually a _python_ in unix:ish environments? I know about adding: #!/bin/sh ..as the first row in a shell script, but when I installed python on a NetBSD system, I didn't get a "python" executable; only a "python2.4"
2
1507
by: John Salerno | last post by:
Ok, like I mentioned before, I'm learning C# for fun. I'm interested in learning Python sort of as a "supplement" (by that, I mean a language with scripting capabilities that can do things maybe simpler than C# might). One concern I have about learning them simultaneously is that I'll start to get overwhelmed and mix things up, but I think I'm at least smart enough not to do that! :) My other concern is exactly how indepth I'll need to...
3
316
by: David Schwartz | last post by:
I'm writing a little c program and one of things I'm trying to get it to do is cd to a particular directory and then run an exe that is on my path, as follows... strcpy(working_string, "c:\\davedata\\bats\\ks.exe fnord"); system("cd \\playtime\\d\\build\\html"); system(working_string); But ks.exe does not seem to be invoked on the files in the \\playtime\\d\\build\\html directory.
9
1171
by: allenjo5 | last post by:
Here's a code snippet: i = 0 while (i < 20): i = i + 1 (shellIn, shellOut) = os.popen4("/bin/sh -c ':'") # for testing, the spawned shell does nothing print 'next' # for line in shellOut: # print line
6
8486
by: Sanket80 | last post by:
Hi, I have one shell script which runs a report and sends the output to user. The shell script has some queries written in it in SQL and hence when I execute a shell script via a concurrent programme, I need to ensure that shell script connects to Oracle Database to execute the SQL written inside it. Now when I hard code the shell script with User ID / PWD, the scripts run fine.....but I dont want to put the user id and pwd in shell script...
2
3480
by: ellennolan | last post by:
Hello, I wonder if anyone can help with calling external shell script in c++. Basically, in the shellscript, I want to pass src, dst, md5. If the src's md5 matches md5 given, it will be link to the dst, if ln fails, copy src to dst. If success, return 0, if fails, return 1. I tried both system, and execvp(fork) to work on it. As execvp never returns, so it cannot tell whether the shell script successfully performs or not. Even there is...
6
2839
by: stanleyxu | last post by:
Hi All, I am porting Perl script to Python script. Everything works fines until calling os.system(). In my script, a number of DOS-commands will be executed. for new_folder, old_folder in folder_array: os.system('MD "' + new_folder + '"'); os.system('XCOPY "' + old_folder + '" "' + new_folder + '"');
5
2167
by: Hul Tytus | last post by:
comp.lang.c c programs & shell conditionals How is a unix shell script made to respond to the value returned by a program compiled from c code? The shell script below is my current effort, which doesn't work. The c code shows what was used to generate a.out, seen in the shell script. The value returned was varied from 0 to 1 for testing.
5
5084
by: inetquestion | last post by:
I am looking for a web interface for shell commands or shell scripts. Does anyone know of any exexisting php scripts which would solve this requirement? PHP form accepts input from a user, then passes these as arguments to a configurable shell script or OS command. I would like for the output generated from the shell script/command shall be displayed in a new javascript window once the form is submitted. Optimally a user should not...
7
6240
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script using the Subprocess module. Here is my code: def resultFromRunning_(command):
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.