Sponsored Content
Full Discussion: Comparison in shellscripts.
Top Forums Shell Programming and Scripting Comparison in shellscripts. Post 302127521 by syndex on Wednesday 18th of July 2007 11:22:12 AM
Old 07-18-2007
Data Comparison in shellscripts.

This idea for a shellscript I have, is just beyond my reach of knowledge.

Basically I have a file that contains a list like so:

axis
heater
water
yast


The file is called mqm.list.

What I want to do is when the shellscript is run, it prompts the user to input data.



Say the person inputs:
axis fire water yast unibrow car truck


I want it to output, only what is on the mqm.list.

So in the example above, the output should be:

axis water yast


Because it matched the mqm.list.

I've tried a bunch of different things, but I'm not getting the concept down. Could someone help me please? Using a test like:

if [ $input = mqm.list ]

isn't working...
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

comparison

can anyone point me to a comparison of *nix file systems ? i think i prefer a journalling fs but i would like to see a comparison between several fs's before i make up my mind (2 Replies)
Discussion started by: cnf
2 Replies

2. Shell Programming and Scripting

"SCRIPT" (recording session) from ShellScripts

Hi all, Hope that we are all familiar with the "script" command, which helps us to record the session into any file, until we give "exit". Can anyone help me, how to do this process from a shell script!? I face problem while ending the script using "exit" which comes out of the program. This... (3 Replies)
Discussion started by: mohanprabu
3 Replies

3. UNIX for Dummies Questions & Answers

Reengineering ShellScripts

Hi, I'm new in Unix an ShellScripting and I need a programm that create a sequence diagramm graphically from a shell script. I am just working for 2 weeks in Unix and the Shell. And it would help to understand the whole shellsscripts. Is there a freeware tool, that can create such a thing?... (1 Reply)
Discussion started by: roessrob
1 Replies

4. Shell Programming and Scripting

string comparison

Hello experts, (tcsh shell) Quite new to shell scripting... I have got a file with a single word on each line. Want to be able to make a comparison such that i can read pairs of words that are ROT13 to each other. Also, i would like to print the pairs to another file. Any help... (5 Replies)
Discussion started by: Jatsui
5 Replies

5. Shell Programming and Scripting

need some help..Comparison

I need some help which would probably be for most of you a simple script. I need to read in the data from a .dat file and then compare avg to see who is the highest avg. Here is my script so far. #!/bin/ksh #reading in the data from lab3.dat filename=$1 while read name o1 o2 o3 o4 o5 o6... (0 Replies)
Discussion started by: bluesilo
0 Replies

6. Shell Programming and Scripting

SFTP through shellscripts

Hi Everybody, I am in urgent need of a solution. I need to carry out SFTP activities through a shell script. I have generated public and private keys as shown below: Shell-Prompt$> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key... (2 Replies)
Discussion started by: $antaclau$
2 Replies

7. UNIX for Dummies Questions & Answers

Cygwin help needed! for copying shellscripts

Hello, this is not exactly a unix specific question however i am sure someone out there may answer my question. The problem is that i write shellscripts and now i want to convert all these shellscripts to .txt. Is it possible? or if someone knows how to copy the content of shellscript then also... (3 Replies)
Discussion started by: salman4u
3 Replies

8. Shell Programming and Scripting

$((...)) and $[...] comparison

Does $((mathematical expression)) and $ mean the same? (7 Replies)
Discussion started by: proactiveaditya
7 Replies

9. UNIX for Dummies Questions & Answers

comparison

hi guys i need a program that can compare a value read from a com-port and one from the terminal. can somebody help me??? using linux kernel 2.6.14-M5 can only use standard function in sh and bash... (5 Replies)
Discussion started by: metal005
5 Replies

10. Shell Programming and Scripting

Help about comparison

Hello folks, I have two files, which have usernames, I want to see the contents of file1.txt which is missing in file2.txt and another comparison file2.txt contents which is missing in file1.txt. please suggest. file1.txt user u2 u8 a9 p9 p3 u4 z8 aaa ahe oktlo (7 Replies)
Discussion started by: learnbash
7 Replies
dynamic_pager(8)					    BSD System Manager's Manual 					  dynamic_pager(8)

NAME
dynamic_pager -- external storage manager for dynamic pager SYNOPSIS
dynamic_pager [-F filename] [-S filesize] [-H high-water-trigger] [-L low-water-trigger] [-P priority] DESCRIPTION
The dynamic_pager daemon manages a pool of external swap files which the kernel uses to support demand paging. This pool is expanded with new swap files as load on the system increases. It is contracted when the swapping resources are no longer needed. The dynamic_pager daemon also provides a notification service for those applications which wish to receive notices when the external paging pool expands or contracts. OPTIONS
-F The base name of the filename to use for the external paging files. By default this is /private/var/vm/swapfile. -H If there are less than high-water-trigger bytes free in the external paging files, the kernel will signal dynamic_pager to add a new external paging file. -L If there are more than low-water-trigger bytes free in the external paging files, the kernel will coalese in-use pages and signal dynamic_pager to discard an external paging file. Low-water-trigger must be greater than high-water-trigger + filesize. -P This option is currently unimplemented. -S The fixed filesize [in bytes] to use for the paging files. By default dynamic_pager uses variable sized paging files, using larger sized files as paging demands increase. The -S, -H and -L options disable that default and cause dynamic_pager to use a series of fixed sized external paging files. FILES
/private/var/vm/swapfile* Default external paging files. /Library/Preferences/com.apple.virtualMemory.plist Configuration file. XML PROPERTY LIST KEYS
The following keys can be specified in the configuration file. Please see plist(5) for more information about property list files. UseEncryptedSwap <boolean> This optional key activates encrypted swap (aka Secure VM), so that all data is encrypted before being written to a swap file. The default is on for portable computers and off for other computers. Mac OS X July 8, 2003 Mac OS X
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy