okay,now i seem to have a problem with the search command which i used.
Code:
Code:
for example, the user is to input title as "Persia" and "Author" as John. i will then use grep to search for lines which contain the title, then pipe it into another grep command which will then search for author based on the row available, then after that print $3 which is the name of the author.
So if i were to type in "rrrr" for title and "aaaa" for author, the value of price_check="" right? as there is not such existing data inside.
but for some reason, when i did a check on it, it does not seem to work. when i input data which is not in the database, it still displays the message "book exist" instead of telling me "book does not exist". Could you tell me the reason why.
Last edited by zaxxon; 01-14-2010 at 09:07 AM..
Reason: you were already asked to use code tags - do so please!
it should at least have an output , but for some reason nothing is being displayed. i have tried putting "" around the $title and $Author , but it does not seem to work. When u tried running it, did it work for u?
Hello , I have several files which are looking similar to :
file01.txt
keyA001 350 X string001 value001
keyA001 450 X string002 value007
keyA001 454 X string002 value004
keyA001 500 X string003 value005
keyA001 255 X string004 value006
keyA001 388 X string005 value008
keyA001 1278 X... (4 Replies)
I have a data file similar to this (but many millions of lines long). You can assume that it is totally unsorted but has no duplicate rows.
Date ,Tool_Type ,Tool_ID ,Time_Used
3/13/2014,Screwdriver,Screwdriver02, 6
3/13/2014,Screwdriver,Screwdriver02,20... (2 Replies)
I am trying to use awk to create a summary of a structured file. Here is what it looks like:
(random text)
H1 H2 H3 H4
44 78 99 30
31 -- 32 21
12 33 55 21
I'd like to be able to specify a column, say H2, and then have information about that column printed. ... (4 Replies)
$ cat file
a:12:56:12
b:23:12:23
d:32:24:12
c:90:12:24
required output:
a:12:56:12
b:23:12:23
d:32:24:12
c:90:12:24
t:157:104:71
t line is the total line, which will be the last line in the output.
Please help.
I tried this: (4 Replies)