UNIX Scripting help to input string and search a file to find

Hi Don, this is not homework question. I work for a Credit card company and my development goal this year is to learn Unix. I would love if others can help me get started, thanks.

Hi everyone
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file

I know will have to use the read and grep commands, anyone can give me somewhere to start would help

Task: Write a script to display which volume pool a given tape belongs. This script should use as input a file that contains a list of tape barcodes.

thanks,

Richard

OK. The homework violation infraction has been reversed (and you weren't given an infraction for double posting). The other two duplicates of this thread remain closed.

Which UNIX operating system are you using?

What shell are you using?

What is the pathname of the file that contains your list of tape barcodes?

What is the format of the file that contains your list of tape barcodes?

Please show us a sample of the contents of the file that contains your list of tape barcodes (in CODE tags), a sample of the input a user is expected to enter into your script, and the output you are trying to produce corresponding to the sample file contents and user input you will provide (in CODE tags).

Are you just extracting data from your list of tape barcodes, or are you changing something in that file to indicate that the selected tape is now in use?

I suggest you get a book about shell programming (my suggestion, as always, is Barry Rosenbergs "Hands-On KornShell93 Programming"). It will not work to try and teach you this over the internet because this is beyond the scope of this forum.

For the same reason i think the solution to your mentioned problem will in no way help you. If you want to learn shell scripting you should do it yourself (otherwise there will be no learning effect) and if you just need examples for scripting: the internet is full of them and you surely can google yourself, no?

I hope this helps.

bakunin

2 Likes