Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 2nd, 2010, 02:25 PM
Lola Felo Lola Felo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2010
Posts: 1 Lola Felo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 26 sec
Reputation Power: 0
Question Copy the code from text file to command prompt

hi every one..

Please I want help from you..

first I hope to undrestand my English word because Iam Arabic girl and not so good in English...

my problem is:

I wrote code in .c file and I run that code on the prompt command, its ture but I want after the out put copy the code on the command by some statment in the code , how can I do that??

please help me

Reply With Quote
  #2  
Old January 5th, 2011, 12:24 PM
Nylex Nylex is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: London, UK
Posts: 111 Nylex User rank is Sergeant (500 - 2000 Reputation Level)Nylex User rank is Sergeant (500 - 2000 Reputation Level)Nylex User rank is Sergeant (500 - 2000 Reputation Level)Nylex User rank is Sergeant (500 - 2000 Reputation Level)Nylex User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 14 h 11 m 7 sec
Reputation Power: 13
I don't really understand what it is you're asking. Do you want to output the source code to the terminal? Can't you just use the "cat" command for this? For example, if your program was called "foo", you could run it and then print the source code with

$ ./foo; cat foo.c

Note the semi-colon separating the two command lines. Is this what you want? If not, can you give a more detailed explanation please?

Reply With Quote
  #3  
Old January 5th, 2011, 03:45 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,257 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 18 h 51 m 19 sec
Reputation Power: 4445
If you just want to copy and paste you can use gnome terminal in linux or putty in windows, both support copy/paste to and from a command line.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #4  
Old March 2nd, 2011, 01:25 AM
trancewebdesign trancewebdesign is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Location: Southampton,PA,USA
Posts: 4 trancewebdesign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 49 m 15 sec
Reputation Power: 0
Facebook MySpace
Copy the code from text file to command prompt

$ cat hello.c
foo()
{
printf "Hello World";
}

$ gcc hello.c

this code may help you to write and compile c program in Linux command prompt.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Copy the code from text file to command prompt

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap