Fedora :: Conditionally Replace An HTML Tag In A Large File?

Mar 28, 2011

We receive this large file which is generated as a HTML page.So anybody can view it with a web brower.A few lines from this file ...

Code:
<tr><td><font color="#555555" size="3" face="Tahoma, Arial, Verdana, Helvetica"> 1999 <font color="#cc6600" size="5">←</font> <font color="#0066ff" size="4">03</font>-27

[code]...

View 8 Replies


ADVERTISEMENT

General :: Using Sed To Replace A *large* Number Of Variables In A File?

Jul 28, 2011

I have a large number of log files, on a linux box, I need to cleanse sensitive data from before sending to a third party. I have used the below script on previous occasions to perform this task, and it has worked brilliantly (script was built with some help from here :-)

#!/bin/bash
help_text () {
cat <<EOF
Usage: $0 [log_directory] [client_name(s)]
EOF

[Code]...

However, now one of our departments has sent me a CLIENT_FILE.txt with 425000+ variables! I think I may have hit some internal limit. I have tried splitting the client file into 4 with around 100000 variables in each, this still doesn't work. I'm loathe to keep splitting though as I have 20 directories with up to 190 files in each directory to run through. The more client files I make, the more passes I have to do.

View 2 Replies View Related

General :: Conditionally Deleting Lines From File

Mar 10, 2011

I am facing some problem regarding deletion of a line from a text file. The file consists of the lines of type which consists of more than 6 occurrences of : character in it. The line should be deleted completely and the line next to it must be shifted up.

View 1 Replies View Related

Debian :: Browser Renders Html In Very Large Characters?

Mar 20, 2010

I recently installed Debian 5 04 AMD64, when I double-click on any HTML document it is rendered in very large characters.I guess one of the browsers installed (Iceweasel or Epiphany) is selected by default but I cannot find any clue as to which one.What puzzles me most is that I have not yet edited the Apache2 config files to give access to the directories where these files are stored, nor the user etc, and as far as I understand these HTML documents should not yet be available to Apache2 and the browser.

View 2 Replies View Related

General :: Remove <br> Html Tag And Replace With Newline

Dec 2, 2009

I've been playing around with sed but can't find a way to remove the <br> html tag and replace it with a newline. Sed isn't truly needed awk or other suggestions could be good.

View 3 Replies View Related

Programming :: Replace Html In Multiple Files (80+)

Mar 2, 2010

I want to change some HTML in my files (80+ so I prefer not to do this by hand). I got a script to replace a string in files, however the HTML I want to replace contains an enter (and tab of 4 spaces) (explanation below) Does someone know how I could update my HTML by using a function in Linux?

I also found sed but don't know how to use it with the enter (linenumbers will not work because they variate)...

[Code].....

View 2 Replies View Related

Red Hat / Fedora :: Convert Plain Text File To Html File Without Using Perl?

Jun 9, 2010

I am looking for some source package which will convert plain text file to html file without using perl.

I mainly need to do this on an ARM platform, so if I get sources I can cross compile it.

View 5 Replies View Related

Fedora :: Join Multiple Mp3s Into A Large Single File?

Apr 15, 2011

is there an app, runs in Fedora, with a GUI, that can join multiple mp3s into a large single file?

I know Audacity can do this, but it's not really suitable for multiple files and I have voice notes that are in 10 minute chunks.

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

Fedora :: Replace A Certain Line Of A File With A Variable?

Nov 26, 2009

I want to replace a certain line of a file, my bash script looks like:

#!/bin/sh
sentence="if [ -e /home/inf/Download/$playlist ]"
sed '4c
$sentence' oldfile > newfile
mv -f newfile oldfile

But the variable $sentence can not be identified in ' ' . And also you can see I just want to update the old file. But the sed command can not save the file for me ,so I need to write them to a new file and over write the new file .

View 14 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

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

General :: How To Recode To UTF-8 Conditionally

Mar 6, 2010

I'm unifying the encoding of a large bunch of text files, gathered over time on different computers. I'm mainly going from ISO-8859-1 to UTF-8. This nicely converts one file:recode ISO-8859-1..UTF-8 file.txtI of course want to do automated batch processing for all the files, and simply running the above for each file has the problem that files whose already encoded in UTF-8, will have their encoding broken. (For instance, the character originally in ISO-8859-1 will appear like this, viewed as UTF-8, if the above recode is done twice:My question is, what kind of script would run recode only if needed, i.e.

only for files that weren't already in the target encoding (UTF-8 in my case)?From looking at recode man page, I couldn't figure out how to do something like this. So I guess this boils down to how to easily check the encoding of a file, or at least if it's UTF-8 or not.This answer implies you could recognise valid UTF-8 files with recode, but how?

View 3 Replies View Related

General :: View A Particular Ten Lines In A Large File Where Can't Open The File In Vi

May 12, 2010

I am using RHEL 5.I have a very large test file which cannot be opened in vi.The content of the file has some 8000 lines.I need to view ten lines between 5680 to 5690.How can i view these particular lines in a large file.what is command and option i need to use.

View 1 Replies View Related

Programming :: Converting A HTML File To A PNG File Through Python Script?

Jan 29, 2010

I have managed to create a HTML file inside python code,convert this to a PNG file through a Python script ?

EDIT: Details added: I have a python script which generates map-legends in the form of an html file. The legend generated have to be pasted on a map which is in a png format. A png format file can be pasted on another png format file easily. But because the legends generated are in a html format I cannot paste it on the map file !!

EDIT: Details added: I did Googling first but it resulted in various soft wares for above purpose which I don't want !!

View 12 Replies View Related

Fedora :: F14 Gnome Text/plain Versus Text/html File Type

Apr 2, 2011

I put a text file on my desktop and added a couple lines of text with gedit. File type shows text/plain. Double-click opens the file in gedit which is what I want. I'm using the file to temporarily hold some snips of code that I copy from file to file, but when I copy some html into the file and save it, now file properties show it's text/html and a double-click opens the file in firefox, which isn't what I want. Is there some way to keep the file type from changing itself?

View 6 Replies View Related

General :: Conditionally Change Group ID ?

Jan 27, 2011

I have a set of files that have a group ID number where no group exists in the system with that number.

I want to recursively read the group IDs of all (including hidden) files in the current and sub-dirs, test each file's group ID, and if it equals the search GID number, I want to execute a chgrp command on that file.

Anyone have an admin script already made for this task?

View 5 Replies View Related

General :: Convert A Html File Into A Text File?

Mar 8, 2010

i'm trying to convert a html file into a text file when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it. i even tried -ascii,but no much use.

View 4 Replies View Related

Programming :: [Makefile] Run Command Conditionally In Target?

Nov 25, 2010

I'm learning about how to write Makefiles, and am a bit lost at how to run a command in a target depending on the value of a variable.

What I'm trying to do, is run "strip" only if the user is running a given version of a C compiler.

Here's the code:

Code:
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
#FDPIC ELF binaries can be stripped, but not FLAT binaries
$(if($(CROSS),bfin-linux-uclibc-),
$(STRIP) $@
;)

Does someone know the correct way to do this?

View 2 Replies View Related

Ubuntu Networking :: Script To Conditionally Disable Wireless NIC?

Feb 2, 2011

My laptop is running Ubuntu 10.04. It has both wired and wireless LAN interfaces. I would like to have a startup script that would disable the wireless NIC if there is connectivity on the wired NIC. Does anyone have such a script, or advice on how to write one?

View 2 Replies View Related

Programming :: Perl Find File And Then Replace String In File

Jul 28, 2009

I have script that I'm working on that updates a username in all the files that are called blah.inc for my framework. since i host a bunch of these web apps i need to do it to all of them. so I need to figure out how to update these files automagically with out me watching it to call vim every time. heres what I have so far

Code:

This finds the files but now i need to figure out how to do s/bob/fred/g on those files.

View 5 Replies View Related

Fedora :: Replace A String By A String In Text File?

Apr 26, 2011

If I have a word in a text file and I need to replace it by another word (for example, i need to replace abc by fff) so what is the command I can type it?

I am using vi editor.

View 3 Replies View Related

Ubuntu :: Build Index.html Into A Full Html Page

Mar 9, 2010

I used wget -r to get all the web pages that were linked from index.html. The pages listed in index.html are all chapters. After using wget -r, all the chapters are now in the same folder on my local hard drive. Is there a way to build the chapters in their proper order into a "long"/"full" web page, rather than simply having each chapter as a link/next link on a previous page?

View 9 Replies View Related

Ubuntu :: "Error Splicing File: File Too Large" - Copy To A 500G USB Drive?

Sep 10, 2010

I have seen this 3 times now - it's an updated Lucid with EXT4, trying to copy to a 500G USB drive?

View 3 Replies View Related

Server :: NFS Large File Copies Fail - Error Writing To File: Input/output Error?

Jun 27, 2009

I recently upgraded my file/media server to Fedora 11. After doing so, I can no longer copy large files to the server. The files begin to transfer, but typically after about 1gb of the file has transferred, the transfer stalls and ultimately fails with the message:

"Error writing to file: Input/output error"

I've run out of ideas as to what could cause this problem. I have tried the following:

1. Different NFS versions: NFS3 and NFS4
2. Tried copying the files to different physical drives on the server.
3. Tried copying the files from different physical drives on the client.
4. Tried different rsize and wsize block sizes when mounting the NFS share
5. Tried copying the files via a different protocol. SSH in this case. The file transfers are always successful when I use SSH.

Regardless of what I do, the result is the same. The file transfers always fail after approximately 1gb.

Some other notes.

1. Both the client and the server are running Fedora 11 kernel 2.6.29.5-191.fc11.x86_64

I am out of ideas. Has anyone else experienced something similar?

View 13 Replies View Related

General :: Best Way To Copy A Large File Over NFS?

Aug 24, 2011

I want to transfer a huge file (60GB) over the NFS network on linux. Is cp the best option?

View 1 Replies View Related

Ubuntu :: Large .tar.gz File That Trying To Extract?

Jan 4, 2011

I've got a large .tar.gz file that I am trying to extract, I have had a look around at the problem and seems other people have had it, but I've tried their solutions and they haven't worked.The command I am using is:

Code:
tar zxvf file.tar.gz
and the error is:

[code]...

View 9 Replies View Related

General :: Can't Copy Large File?

Mar 26, 2010

I'm trying to copy a 6Gb file across from my laptop to an external usb drive but it quits at about 4.2Gb every time with a "file size limit exceeded" error. i have checked the output of ulimit -a and there is no limit there on the file size. I'm using the Slax live Cd for this as it always gets the job done

View 8 Replies View Related

Software :: Add A Php File In /var/www/html Folder?

Jan 24, 2010

i am newbie to fedora and php,fedora test page is displaying when i give the ip address now i want to add a .php file in /var/www/html folder but it says permission denied when i want to save .php file in this folder

View 2 Replies View Related

Programming :: Client Side To Include HTML Within HTML?

Sep 12, 2009

what is the best way (i.e standard way that is supported on all browsers and probably as well followed by web crawlers).... to include an html file either locally or externally in another ? Of course , i've done the research and i also know that there are server side includes (php , asp ...you name it) at the moment , i'm using this:

Quote:

<script type="text/javascript" src="path to file/include-file.js"> </script>

however, i've been warned that this method may not show up in some browsers as some tend to ignore this tag and that crawlers like your favorite search engine wouldn't bother reading this. so , what is the best and safest way to do the job? and btw , the reason why i've ousted SSI's from the start is because of among other things:

1) the fact that the included file is static html and because the text is included pretty much everywhere

2) hoping to reduce load time as the code (if successfully recognized) would hopefully be treated like any other embedded external file (e.x like an image) , therefore it would be cached without the need to downloaded it over and over again for each new page on the site.

View 1 Replies View Related

General :: How To Send A Large File Securely

Aug 28, 2011

I need to send large files from a Linux machine to another using cryptography. The sender machine knows the recipient IP but not vice-versa. I don't need strong cryptography and prefer higher-speed less-secure solutions.

There are no problems with presharing crypto keys but I'd prefer not dealing with SSH users creation.

I think to HTTP PUT over TLS, but I never had experience with it and I prefer to hear which are the possible solutions. I know that it can listen as a daemon but I don't know anything about cryptography. So pipeing with OpenSSL may be a solution.

View 2 Replies View Related







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