How to write a script to match a searched name to a given list?
Full title: How to write a script to match a searched name to a given list, and then returns other names with the same properties
Anyway, first time here, hi! So I'm taking an introductory course at uni and there's a question in our lab that asks us to write a script where a user can search a name which will then be compared to a given list of names where each line looks like this:
The script has to then look at the frequency associated with that name (second column, so in ANA's case, 0.120) then output a list of names which match that frequency and sort it in alphabetical order.
This is what I've got so far:
It returns this result:
So it's close but this is what each of the lines looks like in full:
I have no idea why it's giving me ANNETTA since it doesn't even match ANA's value of 0.120.
I'm sorry this was heaps long, but any help would be much appreciated thank you!
Last edited by Scott; 10-17-2017 at 07:59 PM..
Reason: Please use code tags
hi
i want to write a script that contain questions upto 50..when i run the script it has to ask the questions one by one with options like a,b,c,d and user has to answer the each question and finally result (contain how many user selected correctly)
please help me...i need hints to do....... (8 Replies)
Hi all
I have two files X.txt and Y.txt. Both file contains same number of sentences. The content of X.txt is
The filter described above may be combined.
and the content of Y.txt is
The filter describ+ed above may be combin+ed.
Some of the words are separated with "+"... (2 Replies)
Hello,
I'm taking a username from keyboard as input and i want to check if it exists in a list under a directory for example "/home/students/" ....
if there is a match i want to type the list...
can anyone give me an example or a tutorial to read plz?
thnx for your help. (1 Reply)
Hi all,
I have 2 files:Column1 of first file has to be matched with column 3 of second file
first file contain DATA like this in 2 columns one with gene name second with whether CAD,HT,RA T2Dor any one
column 1 column2
ARFGEF2 CAD
DDEF2 CAD
PSCD3 CAD
PSCD4 CAD
CAMK1... (5 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Hi all
I have another question as of now.
I have two files
One file contain
data like this
Serendipity
glamerus
Shenpurity
In another file these entries are present in different columns like this from 2 column onwards
SRN Serendipity Non serendipity ... (1 Reply)
I need to parse a file and depending on a patern match(in the insert job line) separate files have to be created with a line added (content in file2).
Mapping for pattern match and add line :
for Alpha 123
for Beta 234
for Gamma 345
no match (goes into another file)
File 1 ... (3 Replies)
the following pattern match works correctly for me
awk '/name="Fruits"/{f=1;next} /"name=Vegetables"/{f=0} f' filename
This works well for me. Id like to temporarily move the match out of the file ( > newfile) and be able to stick it back in the same place at a later time.
Is this... (7 Replies)
The below bash connects to a site, downloads a file, searches that file based of user input - could be multiple (all that seems to work). What I am not able to figure out is how to display on the screen match found or no match found" and write a file to a directory (C:\Users\cmccabe\Desktop\wget)... (4 Replies)
Scripting language: Shell script
I want to Scan IP's from IPlist.txt through Nessus using shell scripting language. Give the Input (IPlist) to nessus and generate Nessus report in xml or PDF form which is saved automatically on computer .
Please help if any one has idea about how to write... (2 Replies)
Discussion started by: sk151993
2 Replies
LEARN ABOUT DEBIAN
cscope-indexer
cscope-indexer(1) General Commands Manual cscope-indexer(1)NAME
cscope-indexer - Script to index files for cscope
SYNOPSIS
cscope-indexer [-v] [-f database_file] [-i list_file] [-l] [-r]
DESCRIPTION
This script generates a list of files to index (cscope.out), which is then (optionally) used to generate a cscope database. You can use
this script to just build a list of files, or it can be used to build a list and database. This script is not used to just build a data-
base (skipping the list of files step), as this can be simply done by just calling "cscope -b".
Normally, cscope will do its own indexing, but this script can be used to force indexing. This is useful if you need to recurse into sub-
directories, or have many files to index (you can run this script from a cron job, during the night). It is especially useful for large
projects, which can contstantly have source files added and deleted; by using this script, the changing sources files are automatically
handled.
Currently, any paths containing "/CVS/" or "/RCS/" are stripped out (ignored).
OPTIONS -f database_file
Specifies the cscope database file (default: cscope.out).
-i list_file
Specifies the name of the file into which the list of files to index is placed (default: cscope.files).
-l Suppress the generation/updating of the cscope database file. Only a list of files is generated.
-r Recurse into subdirectories to locate files to index. Without this option, only the current directory is searched.
-v Be verbose. Output simple progress messages.
SEE ALSO cscope(1)AUTHOR
This manual page was written for the Debian GNU/Linux system by Robert Lemmen <robertle@semistable.com> (but may be used by others, of
course)
Script to index files for cscope 30. December 2002 cscope-indexer(1)