LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2005, 12:28 AM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Another shell script question


I need a function (or a command line tool?) in a bash script that does the following:

Expands word "[Ss]ome[Ww]ord"
to the following list:
"Someword someword SomeWord someWord"

I.e. it should expand one single word to a list of words using all possible combinations of the letters in each square-bracket pairs in the original word.

There may be any number of square-bracket pairs in the original word, and there may be any number of characters between a square-bracket pair.

Is there maybe a command-line tool that can do just the same?
 
Old 09-10-2005, 05:47 AM   #2
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
If you want to learn bash scripting, there is a very good tutorial: Advanced Bash-Scripting Guide
 
Old 09-10-2005, 12:22 PM   #3
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Code:
echo {f,F}oo
 
Old 09-10-2005, 01:31 PM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Thanks, it works now, but I am faced with an other problem during the same "project":

When I tried to install hunspell-1.0-RC2 from source on this SuSE 9.1 box, I get these errors:

/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld: cannot find -lcurses
collect2: ld returned 1 exit status
make: *** [hunspell] Error 1

I deleted the line "#define CURSES" from hunspell.cxx, so hunspell should not use curses at all. Then why do I get this error?
Besides, I have curses-devel v. 5.4-59 installed, together with all other dependencies of hunspell.

I also made the missing symlink from /lib/libncurses.so.5.4 to /lib/libncurses.so.

There is no configure script for hunspell, so I do not know what to do next...
 
Old 09-10-2005, 02:47 PM   #5
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
Quote:
I deleted the line "#define CURSES" from hunspell.cxx, so hunspell should not use curses at all. Then why do I get this error?
Probably because the makefile contains the -lcurses directive.
 
  


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
Shell Script Question abdul_zu Programming 7 10-06-2005 03:33 AM
shell script Question Whiteghost Programming 4 09-25-2005 10:05 PM
Shell Script Question. rvijay Linux - General 2 07-14-2005 06:41 PM
Shell script question... defa0009 Linux - General 7 04-26-2005 08:16 PM
shell script question rrwhite Linux - General 3 09-15-2004 01:01 AM

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

All times are GMT -5. The time now is 08:12 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