Article 4XX57 [SOLVED] Script for filtering multiple items from a list

[SOLVED] Script for filtering multiple items from a list

by
zetrotrack000
from LinuxQuestions.org on (#4XX57)
Hi
I have a huge list of items with their weights. For example,
Code:item1 24.5
item2 22.3
item3 24.4
etc,Sometimes, I need to filter some of these items according to specified weights. For instance, I want to list all those items whose weight are exactly 20.1, 24.2 and 25.1
I know we can use oneliners like awk, sed, grep to filter these items. But I want to create a simple script, which can filter items according to these specified weights and saves output in another file, and I can run this script as:
Code:[pc ~]# weight_filter input_file > output_fileWhen I try to create such script and put sed or awk, the script does not work and shows no output. Kindly guide me to create such a script.
Thankslatest?d=yIl2AUoC8zA latest?i=ZRQbmd2HZ7I:CN3eKYqHBco:F7zBnMy latest?i=ZRQbmd2HZ7I:CN3eKYqHBco:V_sGLiP latest?d=qj6IDK7rITs latest?i=ZRQbmd2HZ7I:CN3eKYqHBco:gIN9vFwZRQbmd2HZ7I
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments