LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What unix command can be used to open the text file using Textpad (https://www.linuxquestions.org/questions/linux-newbie-8/what-unix-command-can-be-used-to-open-the-text-file-using-textpad-932066/)

for_u_day@yahoo.com 02-29-2012 10:42 PM

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

kapilbajpai88 03-01-2012 12:08 AM

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

for_u_day@yahoo.com 03-01-2012 01:31 AM

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

catkin 03-01-2012 04:00 AM

Which operating system is this running on? Is a user logged on and a GUI desktop running? If so, which one?

for_u_day@yahoo.com 03-01-2012 04:18 AM

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

catkin 03-01-2012 05:09 AM

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 ... ?

schneidz 03-01-2012 07:42 AM

Quote:

Originally Posted by for_u_day@yahoo.com (Post 4615605)
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.

TB0ne 03-01-2012 09:09 AM

Quote:

Originally Posted by for_u_day@yahoo.com (Post 4615786)
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.

AnanthaP 03-02-2012 07:03 AM

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

schneidz 03-02-2012 09:27 AM

^ 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.

for_u_day@yahoo.com 03-06-2012 03:59 AM

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.

TB0ne 03-06-2012 12:37 PM

Quote:

Originally Posted by for_u_day@yahoo.com (Post 4619719)
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.

schneidz 03-07-2012 09:01 AM

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.


All times are GMT -5. The time now is 10:17 AM.