Programming :: Move The Index Of A File To Another Existing File?

Feb 8, 2011

i want to move the text of a file to another file,using sed command. how can i do it?

View 1 Replies


ADVERTISEMENT

Programming :: Append Contents Of One File To Another Existing File?

Nov 17, 2008

I have two files list1.cfg and list2.cfg both files contains differentrecords details like

List1.cfg
NAME1:25:C:NAME LINE1:
NAME2:25:C:NAME LINE2:
CITY:25:C:City:

[code]....

Now I want to append contents list2.cfg to list1.cfg(It ispposible using cat list2.cfg >>list1.cfg) but I want to check if content of (record) in list2.cfg is present in list1.cfg then dont append it otherwise append it.

View 1 Replies View Related

Programming :: Make A Folder For Each File In A Directory Then Move The File Into It

Nov 29, 2010

Initially I thought - use a for loop with ls in it:

Code:

However this causes lots of problems (folders have extensions, I have duplicate folders, the names with spaces create a folder for each element of the name).

The contents of the folder is basically movies (some with subtitles). Some of the names have things like (original) or CD1 CD2 in them.

View 15 Replies View Related

Programming :: Script To Create Index.html File?

Sep 25, 2010

I need a script that can do this: A script that searches all directories and subdirectories for .html files When a .html file is found it creates a index.html file in that folder. It then edits the index.html file and inserts links to all of the .html files that are in that folder into the body. If no .html files are found, it searches for folders. It then creates a index.html file with links to all of the folders.

View 4 Replies View Related

Programming :: Move A File In C?

Apr 17, 2011

I'm trying to move a file in C, but I guess there is a simple method to do this in libc!

Somebody knows how can I do this on libc, or using some "default" method?

View 9 Replies View Related

Programming :: How To Write Using Fwrite Without Affecting Existing Content Of File?

Oct 30, 2010

How can I write to a file multiple times using fwrite without affecting the previous writes?The method shown below accepts a file name, buffer and offset. The method opens the file in reading/writing mode and writes the content of the buffer at offset.

View 1 Replies View Related

Programming :: Move The End Of File Indicator?

Jun 4, 2010

Is there a valid way, or trick to move the EOF indicator of a file? For example the file contains the data:

Code:
I am asking question.
0123456789
This is the example content of the file.
End is after the period.

I want to move the EOF after the number 9 so that when I read the file it will now contain:

Code:
I am asking question.
0123456789
Is this possible? Language to use is C.

View 4 Replies View Related

Programming :: Updating A Text File (replacing The Existing Parameters With The New Values)

Nov 9, 2010

I have a text file that needs to be updated to be used by some fortran code later. it looks like that:

1,1 !Ms for y-stations, Ns for x-stations
0,0,0, !xsta, ysta, zsta

I need to replace the "0,0,0" with new values for xsta,ysta and zsta;

View 4 Replies View Related

Programming :: In A Bash Script - Move A Line To A New File?

Apr 23, 2011

I've got a bash script I'm using to download a text file list of links via axel. What I'd like to do is automate the movement of completed links in the for loop when axel has successfully completed the download. This is what I've got. I can figure that I can just echo append the line to a new file, but what is the easiest way to delete the line with the link I just downloaded?

Code:

#!/bin/bash
for i in $( cat $1); do
axel --alternate --num-connections=6 $i
export RC=$?

[code]....

View 14 Replies View Related

Programming :: Move Line Of Pipe Delimited Flat File If Field 27 = Sold?

Sep 26, 2010

I have a pipe delimited flat file, field 27 is price. I would like to move items marked sold to a new file every couple months.

awk -F"|" '$27 == "SOLD" {print $0}' awktest2.data >> awkout2.data

Allows me to write line to new file but I need to delete the original line, I also want to make sold case insensitive tried [Ss][Oo] with no luck

View 4 Replies View Related

Ubuntu :: Index File For Icon Theme?

Aug 24, 2010

I found an icon theme I want to use. The problem is that it has no index file. Is there some kind of script I can run to automatically generate the index file? Or do I have to go about this manually?

View 3 Replies View Related

Ubuntu :: File Search Index Build?

Nov 7, 2010

I noticed that Ubuntu takes some time in building the file search index. It seems to do it overnight while my PC is powered down )Is there a way to build the index by a command so that I could do searches whenever I wanted, specially immediately after installing a new program?

View 4 Replies View Related

Ubuntu :: File Manager With Index Capabitities?

Apr 8, 2011

I use nautilus at the moment on Ubuntu 10.10 Maverick. I use grep cli command to locate text words or comments in a folder containing hundreds of files, each having 5 or 6 text documents in Greek and English.

I am looking for a manager that will index all entries, and enable me to find a phrase or word within these documents quickly. I seen to recall that some time ago I saw a manager that was capable of this, that generated an index, as data was added, but have been unable to locate it with google.

View 1 Replies View Related

Ubuntu :: Theme.index File Install ?

May 22, 2011

I have a theme for Xubuntu 11.04 I would like to install. How would I do it, I have a Metacity-1 folder, a GTK-2.0 folder, and a theme.index file.

View 4 Replies View Related

General :: Change The Index.html File?

Jul 1, 2010

I just installed linux. How can I change the index.html file?

my dir is var/www/index.html

it doesnt allow me to delete it the index.html (permission denied) I can't move a file into it either. (permission denied)

View 7 Replies View Related

Debian Configuration :: Index.php File DOWNLOADS Instead Of Displaying

Aug 15, 2010

I am running debian lenny running apache (latest) i am trying to make a webserver. i put the index.html file in my www folder. it shows up when i go to my site (localhost) i put an index.php file in my www folder and when i try to go to my site it Downloads the index.php file instead of showing it.

View 2 Replies View Related

Fedora Servers :: Accessing Index File By Hostname?

Sep 6, 2011

I have my home network up and running. I can access my index file by the ip I gave to eth0 - 192.168.0.2

I put this same ip into etc/hosts:
192.168.0.2 localhost localhost.localdomain
One space separates the hostnames from the ip in /etc/hosts.
The hostname command returns: localhost.localdomain

I have /etc/resolv.conf configured the right way, so I can use my isp's DNS servers. I know this because yum works and I can ping anywhere by url. The next step is to learn to access the index file by url locally on my own network.

View 7 Replies View Related

Ubuntu :: Create An Index In A Pdf File That Has No Security Restrictions On It?

Feb 16, 2011

Is there a program available that would allow me to create an index in a pdf file that has no security restrictions on it? I know people can lock there files so I am not worried about thise but if I have open permissions on a pdf file how do I go about creating an index. It seems that by default you get the thumbnail view but I like to be able to click on a index list to go to a page.

View 2 Replies View Related

Applications :: File Index And Searching Software With Web Interface?

Jan 29, 2011

I have a set of PDFs I'd like to index and made searchable. Most importantly, I'd like a web interface so I can search and access remotely. This morning I researched into several different options, but all seemed to fail.

Google Desktop Search - No good because web interface is only to the local host
Beagle - No good because it is no longer support and there are executation errors when running in Maverick
Recoll - No web interface
Strigi - No web interface(?)

I recall using one about 2 years ago that was deployed on Apache Tomcat, but I can't remember the name.

View 2 Replies View Related

Fedora Servers :: Firefox Can't See Apache Index.html File

Aug 25, 2011

My setup is two laptops connected by crossover cable. One runs Windows xp the other Fedora 13. Neither is connected to internet. I'm using a subnet of 192.168.1.x On Fedora eth0 is up, apache runs because it creates pidfile. Everything pings fine. Windows xp ip pings fine from command line. Gave Windows xp a static ip of 192.168.1.1 mask 255.255.255.0 and gateway 1.2, same as eth0. xp says it sees the server. eth0 is up.

DirectoryIndex looks at index.html. I created that file with very simple code and put it in document root. Document root permissions are 755. Access_log 770. Error_log 644. Apache User 755. Listen 80 When I type the ip for eth0 (192.168.1.2) into firefox, firefox gives me an error message - can't find server. The connection status says its connected.

The error log includes a line: [warn]./mod_dnssd.c:No services found to register I don't know what this means. Apache is not writing to access_log. When I cat the path to access_log I get nothing, then a command prompt. I'm looking for the part I'm missing that will let Apache serve that index.html file to firefox so I can see how my code looks to firefox as I go.

View 6 Replies View Related

Ubuntu Servers :: Edit Index.html File With Winscp (SSH)

Mar 4, 2011

Whenever I try to edit my index.html file with Winscp (SSH), it says I don't have the permission to do so. Is there anyway I can change that?

View 4 Replies View Related

Software :: Edit Index.html File Of Apache Web Server

Aug 16, 2010

Do I need to restart the webserver if I make any change in the file index.html? Or should the changes get reflected when I open the page again without restarting the service?

View 3 Replies View Related

Slackware :: Error: Cannot Open Basenames Index Using Db3 - No Such File Or Directory (2)

May 11, 2010

I am trying to install flash-plugin-10.0.45.2-release.i386.rpm so I inputed the folowing command and got the following error output:

Code:
bash-3.1$ rpm -i *.rpm
error: cannot open Basenames index using db3 - No such file or directory (2)
error: cannot open Providename index using db3 - No such file or directory (2)
error: cannot open Conflictname index using db3 - No such file or directory (2)
error: Failed dependencies:

[Code]...

View 3 Replies View Related

Ubuntu Servers :: Enter Domain Name Instead Of Processing Index File It Downloads?

Feb 14, 2011

i have a weird issue with my web server. every time i enter my domain name instead of processing my index file it downloads it. wth could be the problem first time this ever occurred. recently installed webmin.

View 7 Replies View Related

Ubuntu Servers :: Virtual Hosting - Name The Index.htlm File Of 2nd Domain?

Apr 13, 2011

Ubuntu 1010 server 64bitlighttpdFor the 1st domain,say domain1

I name the index file as:
/var/www/index.html
/home/lighttpd/default/http/index.html

[code]....

View 4 Replies View Related

General :: Remove Index.html File Alone In Every Directory Via Bash Script

Jul 7, 2011

I want to remove the index.html file alone in the every directory via bash script, for example i have 5 directories in the path /var/www/vhost

anish
kumar
linux
question
friend

each directories have index.html file now i want to replace the index.html file alone from the other directory /var/tmp/vhosbak

anish
kumar
linux
question
friend

How we can do this using script?

View 5 Replies View Related

Software :: Add More Files To Branch / Fatal: Unable To Write New Index File?

Feb 18, 2011

Dear all
I am new to git (and storing multiple copies of my code).

I was using git for one month (git status, git add, git commit) to store my files.

I have problems to add more files to my branch

git add BasisExpansion.R
fatal: Unable to write new index file

this was working great unless the day my system administrator destroyed my main partition (it was an accident) and installed everything from scratch. My home directory stayed intact (I did not lose any files not git files that are stored under /home). But from this point of time git returns always that error. My system administrator creater the same user and group as my old user was but this didnot fix the problem.

I am not sure If I can recover my old git structure or would it be better to wipe out the old git dir and start a new one?

View 8 Replies View Related

Software :: Printable File Catalog Or Index For (external) USB And Flash Drives

Aug 29, 2010

Can anyone point me to already built and mostly working utilities that will catalog the contents of (external) USB and flash media in a way that they might be searched?With cheap (under $100 US) terabyte external drives, it is too easy to get another drive and fill it. I'm looking for utilities or applications that will help me know what I have, cull the duplicates, and avoid the need to spin a drive just to see if it holds what I seek.

Years ago there were utilities that would read the contents of diskette media and create a printable "index" or "catalog" page. The pages were conveniently sized to match the diskette so that one could store the page in the diskette sleeve for future reference.Later, the pages got replaced with applications that stored a disketter ID along with each file name. One could then search for a name, or pattern, and discover which diskette held the file(s) of interest. Today we don't have diskette sleeves, but we do have cases for our external USB drives and wallets for our flash media. A printed index would be nice to have.

View 14 Replies View Related

General :: Why 'cannot Overwrite Existing File'

Mar 8, 2011

I try to write to a file "date > file" but Linux says 'cannot overwrite existing file'. I tried chmod 755 but still cannot write to the file. What should I do?

View 2 Replies View Related

Software :: How To Get Spec File From Existing Rpm?

Jan 10, 2009

I want to change some thing inside the post install script of an existing rpm.there is any way to create a nearest spec file of this rpm, in order to change a bit the post install script inside this spec and then create again the rpm with the fixed spec file? no body wrote any program that can create spec file(99% identical from the orig spec file?)?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved