08-09-2015
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?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
i need to print pathname in which the string present using 'find' command
sample output like this
Pathname String to be searched
---------- --------------------
/usr/test/myfile get
/opt/test/somefile get
Thanks in... (4 Replies)
Discussion started by: princein
4 Replies
2. UNIX for Dummies Questions & Answers
Guys - I am new to Unix scripting and am in need for a script that does the following. I have bits and pieces created and tested but i am just having a little difficult time getting it all together.
- Loop through till it finds a string in a specific file.
Any help is greatly appreciated.
... (1 Reply)
Discussion started by: mrehman
1 Replies
3. UNIX for Dummies Questions & Answers
ALL,
My shell script takes a employee file as input.
I have to identify the list of employees not in the input file and update their status in the database.
Approach I followed:
by traversing through the input file add all the emplid's to a variable.
update the status of employees not in... (2 Replies)
Discussion started by: sailussr
2 Replies
4. Shell Programming and Scripting
Hi I want to search the following in the entire file and put them in a diff file.
file 1 contains :
Non error probabilities are not decreasing in curve 1GEORGE_SGD_SUB
Mid Point RESCAP_SGD_SNU curve have errors
Non default probabilities are not decreasing in curve ABF_JPY_SUB
Mid Point... (3 Replies)
Discussion started by: szchmaltz
3 Replies
5. Shell Programming and Scripting
Hi,
I have the output (as below) which i want it to be in a table.
For e.g.
space utilization in PSE on path /logs is 0%
space utilization in PSE on path /logs/tuxedo/tuxlsp is 16%
space utilization in PSE on path /ldvarlsp/lsp/log is 37%
space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies
6. Shell Programming and Scripting
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958(which is hostname) only,... (5 Replies)
Discussion started by: gsreeni
5 Replies
7. UNIX for Dummies Questions & Answers
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... (1 Reply)
Discussion started by: 12ic11
1 Replies
8. Shell Programming and Scripting
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... (1 Reply)
Discussion started by: 12ic11
1 Replies
9. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
10. UNIX for Beginners Questions & Answers
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
YAP(1) General Commands Manual YAP(1)
NAME
yap - prolog interpreter and compiler
SYNOPSIS
yap [options] filename
DESCRIPTION
yap is a prolog interpreter and compiler.
In its basic form, yap starts an interactive Prolog interpreter. When restoring a saved state, yap will allocate the same amount of memory
as that in use when the state was saved, unless a different amount is specified by flags in the command line. By default, yap restores the
file startup from the current directory or from the yap library.
See the yap manual for how to use yap for writing Prolog scripts.
OPTIONS
-? Print a short error message.
-s n Allocate n K bytes for local and global stacks.
-h n Allocate n K bytes for heap and auxiliary stacks
-t n Allocate n K bytes for the trail stack
-l yap-file
Compile the Prolog file yap-file before entering the top-level.
-L yap-file
Compile the Prolog file yap-file and then halt. This option is useful for implementing scripts.
-g goal
run the goal goal before top-level. The goal is converted from an atom to a Prolog term.
-z goal
run the goal goal as top-level. The goal is converted from an atom to a Prolog term.
-b boot-file
Boot code is in Prolog file boot-file. The filename must define the predicate '$live'/0.
-c ip-host port
Connect standard streams to host ip-host at port port.
filename
Restore state saved in the given file.
-- Separator for arguments to Prolog code. These arguments are visible through the unix/1 built-in.
ENVIRONMENT
YAPBINDIR
Yap usually boots from a saved state. The saved state will use the default installation directory to search for the YAP binary
unless you define the environment variable YAPBINDIR.
YAPLIBDIR
Yap always tries to find saved states from the current directory first. If it cannot it will use the environment variable YAPLIBDIR,
if defined, or search the default library directory.
YAPSHAREDIR
Yap will try to find library files from the YAPSHAREDIR/library directory.
SEE ALSO
The YAP manual is on a debian system available through the info system (command info yap), and as a html document through the debian help
system.
AUTHOR
Yap was written by R. Lopes, L.Damas, V. Santos Costa.
This manual page was compiled by Ralf Treinen <treinen@debian.org> from the Yap manual for the Debian project (but may be used by others).
COPYRIGHT
Since this manpage is derived from the yap manual it is subject to the licence of the yap manual:
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified
versions.
December 23, 2007 YAP(1)