Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 03-05-2004, 12:33 AM   #1
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Rep: Reputation: 16
1. shell script "find and replace" on text 2. java GUI application

distro: suse 9.0
kernel: 2.4.22

1. How do I implement a "find and replace" BASH shell script?

#locate the file xfiles then find the word randomx inside xfiles.
locate xfiles | grep "randomx"

#replace randomx with this word.

#then delete the "Smoking Man" word/sentence.

2. Newbie Java programmer. Bear with me.

Can I use QT or Glade or Kdeveloper or any other RAD Visual application to write Java code? I want to draw objects like buttons then just add the java code associated with that object, instead of doing everything from scratch.

Old 03-05-2004, 01:28 AM   #2
Registered: Nov 2003
Location: Kerala, India
Distribution: Red Hat, Knoppix, Mandrake, FreeBSD
Posts: 231

Rep: Reputation: 30
the answer to the first question is :
read the man page of sed to get more information... this would help you more... i don't have more information of it right now...
Old 03-05-2004, 11:17 AM   #3
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185

Rep: Reputation: 30
here's an example of how I replace text in files located in one directory.

ls | while read fname; do
cat $fname | sed 's/randomx/newx/' > $fname.tmp
mv $fname.tmp $fname
Old 03-05-2004, 12:49 PM   #4
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Original Poster
Rep: Reputation: 16
Thumbs up got the find text and replace it part...

#replace the word "cancerman" for the word "mulder" in the file xfiles.

replace cancerman mulder -- xfiles

Cool. Got it. I found sed a little more complicated in syntax terms. That's my opinion anyway so don't take it too serious.

2. So...Is there any RAD visual application for Java? can I use QT or Kdeveloper?

Old 03-05-2004, 01:01 PM   #5
Registered: Feb 2004
Location: MD
Distribution: Fedora 9
Posts: 129

Rep: Reputation: 15
I haven't programed in Java in a while, but Borland has a RAD for Java (Called JBuilder). Im not sure if NetBeans has it... but it might. Check into those two.

I am also not sure which API they use either. Im sure you can choose between the two, but I dont know (I only use Swing anyway).

Hope this helps!

Last edited by elitecodex; 03-05-2004 at 01:08 PM.


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
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Starting Java from shell script (Exception in thread "main") rolf_mueller Linux - Software 5 10-30-2004 02:11 AM
can I replace text with the result of "wc" using sed? BrianK Linux - General 1 04-21-2004 01:15 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:31 PM.

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