06-26-2008
0ops, you missed understanding, its not homework or quiz, its just exercise from a book.
Ive googled before i post, and i got some result but didn't work quit right,
i wont post something and wait long to get reply for it since i can search it.
but still thanks for trying.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file called inputs. Now that file has the values like this:
1 2 3
Now In my script called 'get.sh' I do this :
exec < inputs
read a b c d
Now I know that there will not be any value in d. How can I check it. I need the exact condition for checking whether the variable has... (1 Reply)
Discussion started by: sendhilmani123
1 Replies
2. UNIX for Advanced & Expert Users
hi,
I'm working on a project where I get mails from different customers, what I need to do is I need to check if it is genuine mail and if there is any attachment I need to validate them and extract the message and save in the local directory as a text file say and then I need to direct it to... (4 Replies)
Discussion started by: sudharsanc
4 Replies
3. Shell Programming and Scripting
i have a file in unix in which the records are like this
aaa 123 233
aaa 234 222
aaa 242 222
bbb 122 111
bbb 122 123
ccc 124 222
In the output i want only the below records
aaa
ccc
The validation logic is 1st column and 2nd column need to be considered
if both columns values are... (8 Replies)
Discussion started by: trichyselva
8 Replies
4. Shell Programming and Scripting
i have a input file like this
001|rahim|bajaj|20090102
while reading the file i need to check whether the first column is a number
second column is a name
is there any methodology to check for the same
thanks in advance (2 Replies)
Discussion started by: trichyselva
2 Replies
5. UNIX for Dummies Questions & Answers
Pardon my ignorance but I am lost on how to do this
I have a file called "Sample.txt", it is pipe delimited, it should have 13 fields. But some of the records do not, I would like to set up a shell script
where I can pass in a parameter "Sample.txt" and it would split the file into records... (2 Replies)
Discussion started by: dgeehot
2 Replies
6. Shell Programming and Scripting
I have a file that contains records in the below format:
23857250998423948239482348239580923682396829682398094823049823948
23492780582305829852095820958293582093585823095892386293583203248
23482038509825098230958235234230502958205983958235820358205892095... (10 Replies)
Discussion started by: shellhelp
10 Replies
7. Shell Programming and Scripting
Hello All,
I have the following file. The first column is Type. Always the file will have one H and one T type in between all D type reocrds.
Need todo some validations.
H|ABCD
D|TAB N0003107809CD2013-11-14|RYAN|FRY|7 DR|RICHMOND HILL|GA|32431|X|C95|000009999|000000001|TAB||C0001
D|TAB... (3 Replies)
Discussion started by: karumudi7
3 Replies
8. Shell Programming and Scripting
Hi,
I have basic knowledge on unix shell scripting(not an expert).
My requirement is reading the csv file using the schema defined in the configuration file and if the condition is not mached then move the unmatched record to a error file and matched good records into other file.
In brief: ... (43 Replies)
Discussion started by: shree11
43 Replies
9. Shell Programming and Scripting
Hi,
I want to check if a file is a regular file or not using server name and file path.
Example: I want to check whether //<server_name>/home/chandan/abc.txt is a regular file or not.
Need your help!!.
Thanks (3 Replies)
Discussion started by: ChandanN
3 Replies
10. Shell Programming and Scripting
Ladies and Gents,
I need to be able to verify the file and validate the file format. Is there a way to verify this using ksh? Please forgive me, I'm very new to UNIX scripting.
12345_dbname_1_sqlname.sql
12345 - change number
dbname - database name
1 - sequence
sqlname - sql... (4 Replies)
Discussion started by: Philani
4 Replies
QUIZ(6) Games Manual QUIZ(6)
NAME
quiz - test your knowledge
SYNOPSIS
/usr/games/quiz [ -i file ] [ -t ] [ category1 category2 ]
DESCRIPTION
Quiz gives associative knowledge tests on various subjects. It asks items chosen from category1 and expects answers from category2. If no
categories are specified, quiz gives instructions and lists the available categories.
Quiz tells a correct answer whenever you type a bare newline. At the end of input, upon interrupt, or when questions run out, quiz reports
a score and terminates.
The -t flag specifies `tutorial' mode, where missed questions are repeated later, and material is gradually introduced as you learn.
The -i flag causes the named file to be substituted for the default index file. The lines of these files have the syntax:
line = category newline | category `:' line
category = alternate | category `|' alternate
alternate = empty | alternate primary
primary = character | `[' category `]' | option
option = `{' category `}'
The first category on each line of an index file names an information file. The remaining categories specify the order and contents of the
data in each line of the information file. Information files have the same syntax. Backslash `' is used as with sh(1) to quote syntacti-
cally significant characters or to insert transparent newlines into a line. When either a question or its answer is empty, quiz will
refrain from asking it.
FILES
/usr/games/quiz.k/*
BUGS
The construct `a|ab' doesn't work in an information file. Use `a{b}'.
7th Edition May 20, 1985 QUIZ(6)