Software :: Finding A Php Script To Format And Display A Select Amount Of Text From A File?

Jan 23, 2009

i need a php script to format and display a select amount of text from a file or a cron job that'll do it (with grep etc) and out put to a file but whatever is easier i want to display all the banned ip's i have in my .htaccess file i have a lot of lines in my .htaccess file but i have a line that read like this:

Code:

RewriteCond %{REMOTE_ADDR} (123.123.123.123|123.123.123.123|123.123.123.123)$

the 3 test ip's are 123.123.123.123 and i want the "" stripping and the "|" removing and each ip to be on it's own line like this:

123.123.123.123
123.123.123.123
123.123.123.123

i'm not bothered if this is a php script that'll read the .htaccess file and display the output or a cron job that'll run every x mins and output it to a .txt file but i'd prefer a php script

View 14 Replies


ADVERTISEMENT

General :: Get Output Of Text File Containing Account Number, Debit Amount, Credit Amount,date Using Shell Script?

Apr 9, 2011

How to get output of text file containing account number, debit amount, credit amount,date using shell script?

View 1 Replies View Related

General :: Display Utf8 Format In Text Area?

Aug 10, 2009

I have a form that have a browse button, convert to ASCII button, cancel button and text area... all i have to do is...? when i click the browse button and choose a folder that have a utf8.txt the file that have utf8 will appear or display into the text area... what i can i do to make this..?

View 6 Replies View Related

General :: Select All Text From A File With Nano?

Oct 6, 2010

I open a file in Ubuntu nano editor from the comand line and I want to copy all the contents of the file so I can paste it in an another application outside the shell. So far I can only copy using shift on the screen that is visible but not on all content.

View 4 Replies View Related

General :: Finding Data From A Text File?

Mar 22, 2010

I'm trying to write a shell script which finds bits of data from a text file. at the moment i'm using grep and basically i need a function which will look through the text file and take the data out of it. the file has days, months, years etc and i want it so i can type feb 06 and it finds all of the data for feb 06.

the problem i have is i can type feb and all the information comes back for feb, but i can't get it more precise e.g. feb 2009 and it finds just feb 2009, it seems to ignore that latter half. I've tried experimenting with egrep and having two inputs but i can't seem to fuse them together, it only takes the first input.

View 8 Replies View Related

General :: Use Find To Select Users With A Certain Amount Of Disk Space Usage?

May 16, 2011

I want to find all users shown in the /home/ directory whose disk consumption is more than 500MB. The following command works as expected.

cd /home/ && du */ -hs
68K ajay/
902M john/
250M websites/

From the above example, only 902M john/ should be returned.

How can I make the find command output the same results?

View 4 Replies View Related

General :: Convert Pdf File To Text Format In 4.7?

Dec 27, 2010

I have an pdf file on my linux RHEL 4.7 machine. I can open that file but when i click on 'saveas' to save the file in 'Text' format there are no options i see there. I need to save the 'pdf' file to 'text' format. could anyone tell me how to save the pdf file to Text format. Iam using 'KDE'

View 6 Replies View Related

General :: Unconvert Text File From Binary Format

Dec 28, 2010

I've got a rather large CSV file (~700MB) which I know to consist of lines of 27-character alpha-numeric hashes; no commas or anything fancy. Somehow, during its migration from Windows to Linux (via winSCP and then a few regular SCPs), it has converted into some kind of binary format I am unfamiliar with.If I open the file in vi, everything appears fine, and it says [converted] at the bottom, although I know it's not a line endings issue (and dos2unix doesn't help). If I 'head' the file, it looks proper except for a " at the beginning of the first line. If I open up the file in nano, however, I see the at the start and then "^@" before every character (even newlines and EoF).

If I try to re-save or copy the file (say via: head file.csv > short.txt), this special encoding is preserved. I copied the first ten lines out of vi (which displays it properly) into my Windows clipboard via my SSH client, then pasted it into a new text file, test.txt. This file is visually identical when opened in vi (and similar through 'head', minus the ), although it's roughly half of the filesize. I have no idea what format this once-text file got converted to (it's notoriously hard to search the internet for symbols), but surely there must be some way to convert it back.

View 1 Replies View Related

General :: Cannot Run CGI On Apache - Get The File In It's Plain Text Format

Jan 31, 2011

I'm trying to run a CGI file with Apache2, but when I navigate to it, I just get the file in it's plain text format and not actually parsing the file. What do I need to configure?

I've tried this Code: <Directory /var/www/>
AddHandler cgi-script *.cgi
Options +ExecCGI
</Directory> And I've tried this Code: <Directory /var/www/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
[Code]...

View 1 Replies View Related

General :: Output A Text File In Proper Format?

Mar 4, 2010

it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format
here is my script

Code:

#!/bin/bash
g=`tail -1 new.txt|head -n 1`
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for((i=1 ; i <$g+1 ; i++))

[code]....

the message is supposed to be hello , i need to get rid of the endlines somehow..

View 2 Replies View Related

Programming :: String Format - Create A Text File ?

Feb 3, 2010

I am using C. I have a fuction that returns a string

Code:

I need to format this string so that I can create a text file like so:

So I'm trying:

Code:

But I get errors like:

View 2 Replies View Related

General :: Finding (HTML) File Size To Display In Summary

Dec 7, 2009

Need to find the size of a file (html), and display it in a summary file. (Have tried du, ls, size, but none of these work).

View 6 Replies View Related

Ubuntu :: Display A Text From A File Using Conky?

May 29, 2011

i have the following text in a file located in /home/anoopm101/.task [description:"this is the text" entry:"1306682734" status:"pending" uuid:"25c54e1b-824f-52bc-4933-dfe7cda34bc7"]

i have to display on my desktop "this is the text" using conky.

View 2 Replies View Related

Ubuntu :: To Display A Text From A File Using Conky?

May 29, 2011

i have the following text in a file located in /home/anoopm101/.task

[description:"this is the text" entry:"1306682734" status:"pending" uuid:"25c54e1b-824f-52bc-4933-dfe7cda34bc7"]

i have to display on my desktop "this is the text" using conky

View 7 Replies View Related

General :: Ubuntu - Search Text In Files And Display File Name?

Mar 30, 2011

I am using find some_dir -name "*.some_ext" | xargs -l10 grep "some_expr"

to find files in folder, but I just want to display the file name but not all file content. Any solution?

View 2 Replies View Related

General :: User Passwords Display In Log File In Clear Text?

Apr 21, 2010

Running SunGard Banner software on RHEL 4.2 x86-32 bit Linux server Oracle Application 10.1.2.3 samba enabled. Users run processes/reports that are logged in a daily log file. In our daily job submission log files the user password shows up as clear text.The password shows up as $PSWD (sample from the logfile):

$JOB
$BANUID
$PSWD

[code]...

View 1 Replies View Related

Software :: Parsing A Text File To Display Certain Data On Website In Php?

Dec 26, 2009

Im trying to figure out how to display parts of a .db file created by the scorch2000 server to display a player name, games played, score and maybe more...

here is the text file format example:

playername1 password email #ofgames score setting1 setting2 setting3
playername2 password email #ofgames score setting1 setting2 setting3
playername3 password email #ofgames score setting1 setting2 setting3
playername4 password email #ofgames score setting1 setting2 setting3
playername5 password email #ofgames score setting1 setting2 setting3

I dont want to display everything, of course ^^, but how do i get the player name, the number of games he played and his score to display it in a webpage in this fasion:

Name Games Played Score

joe blow1 25 9876890
joe blow2 31 8989767
joe blow2 26 7989767
joe blow2 17 5989767
joe blow2 13 4989767

and by highest score because the log doesin't put them in in score order....

please help, i asked the maker because he has one runing already but no answer back, well the game is pretty old so i didn't really expect an answer anyways and tryed to figure it out but i dont know functions in php, this is to include in a php-nuke block (this i know how to do

here is an example of a working page at the developper website:url

View 14 Replies View Related

Debian Configuration :: Change Amount Of Display Hertz In VC?

Aug 6, 2010

How do I change amount of display Hertz in VC? I have a conjecture that it's not the same as in GUI (on my computer). Ubuntu 10.04, Gnome. if not Debian, but at least it's close.

View 2 Replies View Related

Software :: Command To Display Amount Of Data Read And Written?

Apr 3, 2011

I know there's a command to display the live amounts of data being written and read to the disk.Like, it tells you how many blocks have been read/written so far to a device

View 1 Replies View Related

Ubuntu :: Can't Select Any Text Using Shift Key

Jun 5, 2011

When I connect to my ubuntu machine at work via NX (shadowing the existing session), I cannot select any text using the shift key. Shift key itself works (I can use it to capitalize letters for instance). It is just that arrow keys, page down/up keys, home/end does not work with shift. Without shift, they work (so I can navigate, just cant select). I tried running xev to see the key events. In the local X11 session (XQuartz), keeping shift key pressed and pressing home prints the expected key press/release events. However, in the NX session, pressing shift prints "key pressed Shift_L" but then pressing home/end/page up/page down prints nothing.

I have no problems with any of the other keys within the remote session. Alt, for instance, works perfectly fine (I can open menus, do alt_tab). Ctrl also works. Ctrl - arrow keys switches my desktops. Editing code is like nightmare because I have to constantly select text using the mouse. I can possibly remap the selection keys to some other combination but that's the last resort.

View 2 Replies View Related

Ubuntu :: Can't Select Text In Forms In Firefox

Jul 21, 2010

I think it started after the last Firefox update - I can't select text in forms on any page - not even here, while I'm writing this. When I double click, the selection appears for a fraction of a second, and vanishes instantly. Neither can I select text by dragging, the same happens. I can still select everything with ctrl+A, but I can't select single words or sentences. It's driving me nuts. I've actually switched to Chrome because of this, but I'm missing a lot of Firefox's functionality there, so I'd rather stay with Mozilla.

View 5 Replies View Related

Ubuntu :: Select, Copy And Paste Text From .pdf?

May 5, 2011

Ubuntu 11.04Adobe Reader 9I can't highlight/select text and copy and paste it to another file. It worked for me on previous version. Please advise how to make it.After installing OpenOffice pdf extension on LibreWrite I can import .pdf but still I can't find the select/copy/paste functions.

View 9 Replies View Related

Ubuntu :: Finding A Utility Similar To Windows Where Click/select Properties/tools/check Disk?

Apr 26, 2010

Is there an Ubuntu utility similar to the one in windows where you right click/select properties/tools/check disk?

View 8 Replies View Related

Ubuntu :: Can't Select Text In Eterm For Copying/pasting?

Mar 3, 2010

I'm running Eterm, and Kubuntu (Karmic.) Anyway, I can't select text at all in the Eterm window. I can highlight the text with the mouse, but as soon as a let go of the button, the selection goes away. I mean, the text is still there, its just not highlighted anymore. As a result, I can't copy/paste that text. Have to run a different terminal program (like konsole, or xterm.)

View 1 Replies View Related

Ubuntu :: Sort The Output To A Text File So That It Prints To The Text File At 1 Process Per Line?

Feb 6, 2011

im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.

echo $(ps aux) >>out

The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.

View 5 Replies View Related

General :: Select Text In BASH Terminal Using The Keyboard Without Mouse?

Jan 2, 2011

How to select text in BASH terminal using the keyboard without mouse? I'm using Ubuntu 10.10

View 1 Replies View Related

Ubuntu Servers :: Select OS In Multiboot Server 10.04 Without Keyboard/display?

Jul 19, 2010

Is there a way to select a second installed OS on a home server system without display and keyboard? I am putting together a home server (for mail, storage, media streaming) using an Atom-based Ubuntu Server 10.04 on a 4 GB intern flash drive and 2 hard drives for data storage, but no display or keyboard. I want to make periodic full backups of the system (flash) disk and use a second OS (installed on a partition on the hard drive) with a graphical interface (e.g. Xbuntu or PartImage) for maintenance purposes. I can connect remotely (from a Win7 or a Linux computer) to the X-display once the second system is running.

a) how can the second OS be booted on this server without keyboard? Is there a way to tell Grub2 to look at some hardware switch (or file) for the menu selection? The board has a serial and parallel port so I could wire up a switch to some pin of one of these. Also external USB connectors are available on front and back. Or can Grub2 read its default OS choise from some simple file, easily to change from a shell command of the eBox webbased system control internface?

b) I assume the second OS is needed to make a complete backup of the server OS on the flash disk. Can the backup be automated? (i.e. switch to second OS, backup, reboot first OS)

View 4 Replies View Related

Programming :: Remove Lines In A Text File Based On Another Text File?

Jan 28, 2009

I have a text file called file1.txt containing many lines eg.

line1
line2
line3
line4
line5
line6

Then i have another text file called file2.txt contains

3
5
6

Is there a command to remove the lines in file1.txt based on the keywords in file2.txt? note: It should remove line3,line5,line6 based on 3,5,6

View 10 Replies View Related

Fedora :: Create A Pdf File In A3 Format From Two Sheets In A4 Format?

Apr 7, 2010

my school we want to print a magazine but we have problem with the format of the files. We need to create a sheet in A3 format from two sheets in A4 format. I was reading about the pdftk library but it doesn't do what i need.

View 4 Replies View Related

General :: Finding A Console / Text Based XDM / GDM?

May 22, 2010

I would like that users can log to X but this with a text based xdm + how to active it as last in inittab since it is text what contains my inittab

Code:

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3

[code]....

View 10 Replies View Related







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