LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 08-23-2013, 12:38 AM   #1
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 262
Blog Entries: 2

Rep: Reputation: 49
Lightbulb [rant] Shell script integrated search engine?!


I just had this crazy idea. What if you had an on-line repository of scripts you could access/search via your shell? They would be ranked by users, so people don't get too much malignant and bad script.
You would type something like:
$ dunno -h "replace all filename extentions"
to get the usage help for the top result for that query. (Or a message no scripts with that description exist.)
Executing:
$ dunno "replace all filename extentions" actual arguments to script
$ dunno --manual-pick "replace all filename extentions"
Giving feedback:
$ dunno --rate=last-used
Etc.

Does something like this exist already?
 
Old 08-23-2013, 02:27 AM   #2
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Donno if they exist or not but that can be done.. provided obne should first decide how to provide that solution.
 
Old 08-23-2013, 12:43 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
An example, change it how you want.
Code:
#! /usr/bin/env bash

cmdfu(){ 
curl "http://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext";
}

clear
OPTIONS="Search Quit"
echo "Search http://www.commandlinefu.com from shell"
echo "Press Enter at any time to return to menu."
echo "Select an option:"
select opt in $OPTIONS; do

if [ "$opt" = "Quit" ]; then
clear
exit

elif [ "$opt" = "Search" ]; then
echo "Enter search word;"
read search
cmdfu "$search"

else
echo bad option
fi
done
 
Old 08-29-2013, 01:31 AM   #4
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 262

Original Poster
Blog Entries: 2

Rep: Reputation: 49
That's seems like a very good start. TBH introduced me to that site too, so double thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rant about AMD, think twice when buying mainboards/laptops with integrated graphics TobiSGD Linux - Hardware 11 04-27-2012 12:50 PM
Search for shell script to restore symlinks phi Programming 11 02-27-2008 09:38 AM
Need a script to search and replace text in file using shell script unixlearner Programming 14 06-21-2007 10:37 PM
Search for a file using shell script sharathkv Linux - Newbie 2 08-06-2003 05:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 05:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration