LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-29-2012, 10:42 PM   #1
for_u_day@yahoo.com
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
What unix command can be used to open the text file using Textpad


Hi,
We have a requirement where in , there is a third party program which would generate a Text file or html file and these files would come and get stored in the directory.
Now i need to open these files in only Textpad.exe

Could you please help me on this.

With Regards
Raj
 
Old 03-01-2012, 12:08 AM   #2
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
Hi Raj,

You need to install Putty/Cygwin applications that do support Unix commands. In windows, DOS won't support all Unix commands.

Once you install any of such application, then the command to open a file is "vi". Syntax wou be :
vi <filename>

--Kapil
 
Old 03-01-2012, 01:31 AM   #3
for_u_day@yahoo.com
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your reply,
I have all the required softwares installed as suggested.
Through vi command where do you specify that you need to open this text document in Textpad software only.
It should not open in notepad or anything else but we need to be able to open the file using textpad.exe .

Waiting for your reply.

With Regards
Raj
 
Old 03-01-2012, 04:00 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Which operating system is this running on? Is a user logged on and a GUI desktop running? If so, which one?
 
Old 03-01-2012, 04:18 AM   #5
for_u_day@yahoo.com
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi,
He is on Unix OS, he has few .txt and .html files in a specific directory and wanted to open those files in Textpad only using shell script.
So could you please let me know whether that is possible.

With Regards
Raj
 
Old 03-01-2012, 05:09 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
UNIX or GNU/Linux? Textpad.exe is typically a name for a Windows executable so cannot be run under UNIX or GNU/Linux unless you are using wine or a virtual machine running Windows ... ?
 
1 members found this post helpful.
Old 03-01-2012, 07:42 AM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by for_u_day@yahoo.com View Post
Hi,
We have a requirement where in , there is a third party program which would generate a Text file or html file and these files would come and get stored in the directory.
Now i need to open these files in only Textpad.exe

Could you please help me on this.

With Regards
Raj
hi, i never heard of textpad but judging by the name you provided, the .exe implies you are using windows. so the simple answer would be to open it using textpad ? (so not sure how this is a linux question).

may i ask why you are so adamant about using textpad (special charecters/ formatting ?). there are probably a dozen or so native linux programs that can handle basic ascii/html text like pico, vi or gedit.

if you must use a windows program to view the files on a linux system then the hard solution would be to install wine, then install the windows program on linux, then try to open the files thru wine.

please clarify so we can better assist because i, as well as the previous responders, are thoroughly confused.

Last edited by schneidz; 03-01-2012 at 07:43 AM.
 
Old 03-01-2012, 09:09 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by for_u_day@yahoo.com View Post
Hi,
He is on Unix OS, he has few .txt and .html files in a specific directory and wanted to open those files in Textpad only using shell script.
So could you please let me know whether that is possible.
Textpad is a Windows application...that means, it only works on Windows.

If you have txt and html files, you have MANY text-editor options for Linux. Gedit, vi, emacs, and kwrite, just to name a few. You can also open them in any of the IDE editors, like Bluefish, Anjuta, or Kdevelop.
 
Old 03-02-2012, 07:03 AM   #9
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Textpad is a windows program. Even in windows, this user doesn't want to use notepad (the default but less feature full editor). What's textpad got the even gedit doesn't?

RAJ, talk to your user.

Here are a few URLs for support.
http://en.wikipedia.org/wiki/Gedit
http://projects.gnome.org/gedit/
http://projects.gnome.org/gedit/screenshots.html
It even handles HTML and mark up elements and is configurable.

Follow the URLs, get convinced.

OK

Last edited by AnanthaP; 03-02-2012 at 07:05 AM.
 
Old 03-02-2012, 09:27 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
^ i think it is a case of the user thinks that textpad is the greatest simply because they are not willing to try and get used to something else.

in my previous post i mentioned the possibility of installing wine, configuring it, installing the windows program using wine, then formulate the correct command to launch the windows program using wine. but it is a silly long walk around the park when one can just use one the pre-installed defaults like gedit which likely handles regular ascii text/html better.
 
1 members found this post helpful.
Old 03-06-2012, 03:59 AM   #11
for_u_day@yahoo.com
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
I went back to convince the user and he says the following.
He wanted to see the output in Textpad only because he has configured the output to get printed to Dot Matrix Printer and these setting does not change with Textpad but changes with IE , hence he only wants to get the output in Textpad.

If the same is also possible with suggested solution that is gedit from the previous post , then i will get back to the user with a demo kind and print the output.
But please confirm and also he wanted to print certain specific pages out of that out so i am looking into lpr command.
If anyone has got the same requirement then please post the same.
 
Old 03-06-2012, 12:37 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by for_u_day@yahoo.com View Post
I went back to convince the user and he says the following.
He wanted to see the output in Textpad only because he has configured the output to get printed to Dot Matrix Printer and these setting does not change with Textpad but changes with IE , hence he only wants to get the output in Textpad.

If the same is also possible with suggested solution that is gedit from the previous post , then i will get back to the user with a demo kind and print the output. But please confirm and also he wanted to print certain specific pages out of that out so i am looking into lpr command. If anyone has got the same requirement then please post the same.
No, we can't confirm any of this..how can we? You don't say what the 'requirement' is, or anything about how things are set up, so how can we tell you if it'll work or not?

See post #10 for the best example: the user doesn't want to do anything. Again, textpad can probably be run with Wine, but it is a pointless task. All you're doing is solving one problem (temporarily), by creating others. Why run an what is (essentially) an emulator, to run a SINGLE program, on an operating system it wasn't designed for, just because a user doesn't want to move forward? The user needs to be shown the new programs, and then they need to pick one. Then either the user or YOU can migrate their custom settings to the new program. Otherwise, you are going to cause yourself more problems than you'll solve.
 
Old 03-07-2012, 09:01 AM   #13
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i am still confused... does the dot-matrix work on the linux machine (what is the brand and model) ?

if so what are these settings (formatting like bold, indents, ...) if so maybe a c-program/ script can modify the output for his needs.

if not then no matter what program you use on the host machine, it still wont print.

again, you mention printing something via ie (internet explorer ?) which is windows only; microsoft doesnt make a version of internet explorer for linux (are you sure youre not using windows ?)

if possible, post an example of the input vs. the output and maybe someone can help formulate an idea of how to solve your issue.

Last edited by schneidz; 03-07-2012 at 09:08 AM.
 
1 members found this post helpful.
  


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
[SOLVED] Bash command to 'cut' text into another text file & modifying text. velgasius Programming 4 10-17-2011 04:55 AM
TextPad-like text editor with regex for linux? nickleus Linux - Software 5 10-19-2010 12:39 PM
What UNIX command do you use to find out the open ports? ayongying Linux - General 1 05-28-2010 07:46 AM
what is the command to add text into a text file? newbiebash Programming 2 09-08-2008 08:07 AM
CLI - UNIX command and/or switch to open a package phidor Programming 4 08-06-2008 05:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:18 AM.

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