LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
Posts: 146
Blog Entries: 1

Rep: Reputation: 12
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: 516

Rep: Reputation: 58
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
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,752

Rep: Reputation: 189Reputation: 189
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
Posts: 146
Blog Entries: 1

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 01:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration