General :: Copy Code From Text File To Command Prompt?
Dec 2, 2010
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?
View 3 Replies
ADVERTISEMENT
Oct 14, 2010
I want to be able to check the contents of a text file for a specific string and remove it from the file from the command prompt. I would basically be searching through a number of files and if a specific string is found I would like it removed automatically. pretty much a find and replace, were the replace is nothing. any one got any ideas on how you would do this. I already have the search part sorted just need to be able to remove the string I don't want from the multiple files.
View 4 Replies
View Related
Jan 10, 2011
since some days I have a strange problem with KMail (1.13.5) in KDE4.5.5. When I try to copy some text from an email and past it to any other program (e.g. Openoffice), not only the marked text will be pasted, but a kind of HTML code including the text.
This bug is not OpenSuse specific. I found the same bug in a Fedora mailing list (of course, whithout an answer): Strange Copy/Paste behavior in KMail 1.13.5/Kontact 4.4.8
View 6 Replies
View Related
Mar 1, 2011
How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).
More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.
View 1 Replies
View Related
Oct 9, 2009
I have a script almost working except for 1 thing. What I'm trying to do is read a file that has the files that need to be FTP'd using a bash script. I have everything working except the reading of the file. It works outside of the ftp script I've wrote but once I put it in the FTP script it doesn't.
Here's the Script:
#Here's where the problem is that I know of
I've been playing w/ the exclamation points to see if that could be the problem, but so far no luck.
View 6 Replies
View Related
Sep 19, 2009
favor and let me know how can I copy some text in one file and paste it to another file ,when both of the files are being opened by vi text editor ?
View 7 Replies
View Related
Aug 3, 2010
i need to write a c code to ping IP addresses which are read from a text file and need to log the response time in another text file.
View 4 Replies
View Related
Aug 23, 2011
I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.
Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?
View 1 Replies
View Related
Apr 24, 2009
When using mput in smbclient (with recurse turned on) is there a way to automatically respond yes to the prompt to copy each file, or avoid the question all together?
View 2 Replies
View Related
Jan 20, 2010
I created a bash script to help me mount my network shares.However when I link the file to the desktop and dbl click on the link it asks me if I want toCode:RUN IN TERMINAL - DISPLAY - CANCEL - RUNHow can I get it to RUN IN TERMINAL each time I dbl click it?
View 5 Replies
View Related
Nov 17, 2009
has anyone used some software tool for copying a file from one location to another (I mean local files - for example from one folder to another), which prompts if you already have this file, or a similar one...I'm going to use it for my file archive ... mostly for my MP3For example, I might have the folder /home/user/MP3/Heavy Metal/Old/Downloaded/Metallicabut have forgotten that I already have Metallica in this folder and now I want to copy my new music collection to my archive folder which contains for example this folder:MP3/Rock/MetAllicA-Full-DiscographyI need copy files software which will tell me:"You already have folder with similar name to 'MetAllicA-Full-Discography' called 'Metallica', do you want to skip this folder, or copy it to location 'MP3/Heavy Metal/Old/Downloaded/'?"This way I will reduce the file redundancy in my file archive, or at least will keep similar items close to each other ..
View 5 Replies
View Related
Aug 18, 2010
I would like copy a backup file from image vmware linux to windows but i don't know how to process it ?i tried :scp /source/backup.tar.gz admin@x.x.x.x:/c:ProgrammefilesC:Documentsand SettingsAdminMyDocumentsbut error and i know that it's not like that, so if you have solutions
View 2 Replies
View Related
Oct 11, 2010
I have a String like "A.words=Ajay,Anil" in file A.And it contains a lot of other information also. I wanted to replace "Ajay,Anil" with "Vijay,Vinay" with sed command with using existing file only(not using another file)
View 9 Replies
View Related
Apr 19, 2011
I have a .txt-file with ~50.000 lines of numbers, generated by a mathematics program. From this file, I need line ~ 1.100 to line ~16.000 (these lines are always the same btw, this may make the solution easier, dunno) to be copy/pasted to another file, where the lines ~500 to ~15.000 (also, every time the same) should be overwritten by the aforementioned lines...I haven't found or come up with anything that works yet, mostly I find solutions to copy everything from one file to another but I can't find something to specifically overwrite a part of a file with part of another.
View 4 Replies
View Related
Jul 16, 2011
How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.
View 7 Replies
View Related
Jan 25, 2010
I am troubleshooting file copy time issues between 3 servers. I need to copy the same file from server A to both server B and server C and compare the elapsed times for the copy. Is there an easy way to do this?
View 3 Replies
View Related
Jul 18, 2010
I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.
I tried the commands
Code:
cp water.txt ./*/water.txt
cp water.txt ./*/
However these don't seem to work. The latter gives 'cp: omitting directory' errors.
View 7 Replies
View Related
Oct 4, 2010
I want to insert the text "DB dept" in the last line of passwd file which looks like this right now
Quote:
newuser:x:717:717::/home/sacharje:/bin/bash
And I want it to be like this:
Quote:
newuser:x:717:717: DB dept:/home/sacharje:/bin/bash
I tried to do that with sed but failed, I'd like to know the proper syntex with sed to achieve this.
View 7 Replies
View Related
Feb 11, 2011
I have an SQL dump, file.sql that has many references to a particular domain, d1.com. I would like to run a command that can replace every occurrence of d1.com with d2.com. I've tried looking into sed before but the man pages are quite daunting.
View 14 Replies
View Related
Jan 28, 2010
I need to be able to edit a file from the commend line as I intend to script this operation, the file is called menu.lst The original is as below
Code:
titleUbuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root(hd0,0)
kernel/boot/vmlinuz-2.6.24-24-generic root=UUID=b09feb23-5524-4ec4-862f-94700b968f64 ro quiet splash
[code]....
View 4 Replies
View Related
May 14, 2010
What is the command to sort a text file by the second word?
View 4 Replies
View Related
Jul 2, 2010
Code:
cp -r aa123.h aa*.h
results in
Code:
cp: target `aa456.h' is not a directory
Yes I read man page cp (1p). There is something written there about it, I couldn't understand though.
View 7 Replies
View Related
Jul 28, 2010
How to output to a text file the compound command:
Code:
find -type f -print0 | xargs -0 grep -l "desired text"
I have not been able to find the answer.
[code]...
View 5 Replies
View Related
Oct 18, 2010
I've created a script to test network speeds but I've run in to a little problem. The command outputs this:
Code:
Client connecting to 192.168.111.230, UDP port 5001
Sending 1470 byte datagrams
[code]...
View 1 Replies
View Related
Nov 15, 2010
-the command to copy the file Practice.txt to a new name of Myfile.txt while in the home directory-found
-command to create a directory in the home directory-found
-say i just created a new directory called "test". whats the command to delete the test directory.-found
-command to create a blank, text file without using an editor.
-the exact syntax in Linux you would need to rename the file to a new name-found
View 4 Replies
View Related
Mar 31, 2010
I am not especially cli adept so could someone tell me the best way to use the diff command to get the difference between a string of text and the contents of a file instead of between the contents of two files?
View 3 Replies
View Related
Jul 29, 2011
I don't understand why this is so difficult.In the old days, there was lpforms which allowed some formatting. CUPS did not see fit to implement this into it's lp package.cgi-...-cgi?lpforms+1In the old days, lpr allowed you to select a font in the command line with -1=fontname. CUPS did not see fit to implement this into it's lpr package.htmIn the old days, printers had fonts installed on them that you could access. Modern printers don't seem to have this. So now I still need to be able to select a font when I print certain text files from the command line but it seems this is impossible. I've been working with instances and lpoptions, which allows me to do a lot of other things I need like orientation and margins and even set the font size, but I still cannot choose a font other than the default.
View 2 Replies
View Related
Mar 10, 2011
I wish to append a text at the start of every line and save it to another file without changing the original file.know the command
For example:
Orignal.txt
a.txt
[code]...
View 5 Replies
View Related
Oct 10, 2009
I need to do some text file manipulation which I think should be done with standard commands in BASH. I'm looking at comma seperated text files (stock market data). It comes in the form of date, stock code, open, high, low, close, volume. What I need to do first is move all data with same stock code sequentially into individual files.
While doing this since the stock code will now be the file name I need to remove the stock code. Next I need to filter out overlapping data from different files with the same date. ie. where two files contain the same date on the one line only one line will be added to the combined file. I think there must be a tutorial out there for basic text manipulation like this, I just haven't found it yet.
View 11 Replies
View Related
May 17, 2010
I want to copy location of every .avi , .jpg file present in a folder or in subfolder present in a direcotry and save in a textfile how to doex : /home/username/Desktop/bookofeli/video/book.aviit should give full locaiton of path how to do
View 2 Replies
View Related