08-16-2011
need help with a shel script plzz
hey how u doing guys ... I'm a student @ EMU and taking a beginner Linux class and I have those two extra credit project that im struggling with so I hope to get some correction and help
write a shell script that will
1-prompt the user for a file name
2-check to see if the file exists
3-create the file if the file does not exist
4-then go back and repeat step 1 if the file doesn't exist
#!/bin/bash
if test -e filename
echo "the file is exist."
else
echo "the file is not exist."
echo "filename" > "filename1"
fi
==============================
the other script
create a shell script that will
1- prompt for four file names
2- combine all of the data in the first three files into the fourth one
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just want the output of this command to be stored in a variable like,
str = `grep Application.dbName serverdata/ServerProp.txt`
but while executing it says like,
str : startup 11: not found, where startup is the script name.
but while running the command alone like,
grep... (2 Replies)
Discussion started by: cs_sakthi
2 Replies
2. Shell Programming and Scripting
Hi,
I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work??
Details
****************************************************************************************************... (11 Replies)
Discussion started by: dnkansah
11 Replies
3. Shell Programming and Scripting
Hi,
Iam having the file as follows:
QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894
QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894
OPIUYTREE0986666544443322 dcsx@olivaa.net ... (14 Replies)
Discussion started by: nivas
14 Replies
4. Shell Programming and Scripting
hi friends,
i m tryin to load data from one set of table to other i have sql procedure al ready for it..!
i m going to load the procedure only if data in one of my table for example
table "landing " have 10 records each attribute of this table is
file_name status date ... (2 Replies)
Discussion started by: kulbir
2 Replies
5. Shell Programming and Scripting
Hi,
I have a shell script which will start a process in my prodution server.
I want to write one more script as a cron job, which will start the first script at regular intervals.
My question is what are the things I have to make sure to invoke the first script in second script.
Can I... (3 Replies)
Discussion started by: pradeep_script
3 Replies
6. Shell Programming and Scripting
for ( ( $i=0 ; $i<=6 ; $i++ ) )
do
p=/RSA-Data/PE-data00"${i}"
echo "$p"
done
---
i need output as below
/RSA-Data/PE-data000
.
.
.
/RSA-Data/PE-Data006 (1 Reply)
Discussion started by: mail2sant
1 Replies
7. Shell Programming and Scripting
1.Display a list of /usr/share/doc subdirectories containing information about shells.How many README files do these subdirectories contain? Don't count anything in the form of "README.a_string".
2.Make a list of files in your home directory that were changed less that 10 hours ago, using grep,... (2 Replies)
Discussion started by: cynosure2009
2 Replies
8. Shell Programming and Scripting
Hi all,
if any body could help me out to automate the unix script for finding some particualar files which are based on dates
like see every day i need check the TXT files which are being in processed and Sequential order based on dates
For Example:
files name starts at... (12 Replies)
Discussion started by: krux_rap
12 Replies
9. Shell Programming and Scripting
I am using Ubuntu 12.4
I am running the following script:
++++++++
#!/bin/bash
while ; do
xdotool mousemove 248 539 click 1 &
sleep 3
done
+++++++++
This moves the mouse on the specified position on the screen and clicks that pauses the script for 3 seconds and repeats the... (2 Replies)
Discussion started by: alfarnume
2 Replies
LEARN ABOUT DEBIAN
amc-export
AMC-EXPORT(1) Auto Multiple Choice AMC-EXPORT(1)
NAME
AMC-export - exports marks for AMC multiple choice exams.
SYNOPSIS
auto-multiple-choice export --data project-data-dir --module module --fich-noms students-list.csv [--noms-encodage list-encoding]
--o output-file
DESCRIPTION
The AMC-export.pl command exports marks from an Auto Multiple Choice exam.
--data project-data-dir
gives the directory where data files are (see for example AMC-prepare(1)).
--module module
selects a module for export. See below for the modules included in the AMC standard distribution.
--fich-noms students-list.csv
sets the students list file.
--noms-encodage list-encoding
selects an encoding for file students-list.csv (default is utf-8).
--o output-file
gives the output file name.
--option-out options
gives an option for selected module, in the form key=value (see below for possible options for each module). To specify multiple
options, use --option several times.
--sort sort-type
sort the students names, depending on sort-type. If sort-type is l, use line number from students list file to sort. If sort-type is m,
use mark (and name if marks are equal) to sort. If sort-type is i, use student number to sort. If sort-type is n, use name to sort (or
line from students list if equal).
--useall all
if all is 0 or empty, only students with a scaned answer sheet appears in the output. If all is 1, all students in the students list
appears in the output.
MODULES
OpenDocument
With "--module ods", an OpenDocument (for use by OpenOffice or LibreOffice for example) is produced. The following options are recognized:
nom
gives a name for the exam, to be written on the beginning of the sheet.
code
gives an short name for the exam, to be used as a tab name.
columns
sets the list of columns that are to be added to each student. Default value is student.key,student.name.
stats
with a true value, a table will be added with statistics for all questions.
statsindic
with a true value, a table will be added with statistics for all indicative questions.
CSV
With "--module CSV", a CSV file is produced. The following options are recognized:
columns
sets the list of columns that are to be added to each student. Default value is student.copy,student.key,student.name.
decimal
sets the decimal point (default is a dot).
encodage
sets the encoding to use for output (default is utf-8).
separateur
sets the character used between colums (default is a comma).
entoure
sets the character used to enclose strings (default is a double quote).
ticked
if not empty, additional columns (with "CHECKED:" prefix) are included to give all the checked boxes on all the sheets. This can be
used by an external program to retrieve all the checked boxes when marks are not sufficient. Use value 01 to get 0;0;1;1;0 if boxes 3
and 4 are checked, and value AB to get CD if boxes 3 and 4 are checked.
List
With "--module List", a PDF file is produced with a list of marks for all students. The following options are recognized:
pagesize
The page size. Default value is a4.
nom
gives the name of the exam, to be printed at the top of the page.
ncols
The number of columns. Default value is 2.
decimal
sets the decimal point (default is a dot).
AUTHORS
Alexis Bienvenue <paamc@passoire.fr>
Main author
Jean Berard
Translation from French
Georges Khaznadar
Translation from French
COPYRIGHT
Copyright (C) 2008-2012 Alexis Bienvenue
This document can be used according to the terms of the GNU General Public License, version 2 or later.
Auto Multiple Choice 1.1.1 06/19/2012 AMC-EXPORT(1)