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
ADVERTISEMENT
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
View Related
Jun 25, 2010
We use a SLES 10 SP2 file server. This file server has all type of files. We want to know what is the amount of space used by mp3 files. What we need to know is the total space in disk of mp3 files. I've been testing du command, and find command, but with no satisfactory results. Does anybody know how to do this?
View 11 Replies
View Related
Feb 7, 2011
I want to write expdp output in a text file using a shell script
If i write like below:
It will write whatever is there in log file to text file
But, sometimes export fails with out start taking export (without generating log file) because of job already exists error. such times, we dont know about that error until we check manually... so i wrote like below:
But still it is not writing anything in to text file using above stmt...
View 1 Replies
View Related
Jul 26, 2009
I have a CentOS5 server with a 1tb hard drive.There is only 80gb of data on that huge drive and now I want to make a bare metal recovery backup using AcronisMy question is, how can I estimate the amount of time the backup will take and the size of the image file? Is it based on the size of my drive or is it based on the amount of data on the drive?
View 1 Replies
View Related
Jun 22, 2011
I'm looking for a way to force my PS1 variable to a certain number of chars.
It currently looks like:
$PS1="W $"
and I'm trying to keep the same number of characters regardless of the length of current folder name.
For example, both Documents and bin would be displayed as 10 character strings, keeping the left side of my terminal the same width all of the time.
View 1 Replies
View Related
May 22, 2011
Does anyone know which distro does not need too much space.I have 4G and so far lubuntu and unbuntu both need 4 or more.
View 14 Replies
View Related
Jan 21, 2010
I would like to measure the amount of traffic my webcam is sending. What is the best way to do this? I tried iostat command, but i do not see the webcam traffic back.
View 1 Replies
View Related
Mar 8, 2011
Using Linux, when I boot I automatically have 16 16MB ramdisks, however, I would like to create one really large ramdisk to test some software.I found that I can adjust the size of the ramdisks already on the system with the kernel boot parameter ramdisk_size however, this makes all 16 ramdisks (/dev/ram0 - /dev/ram15) the size that is specified. So if I want to create a 1GB ramdisk, I would need 16GB of memory.Basically, I want to create one 10GB ramdisk which would be /dev/ram0. How would I go about doing that? I assume there is a kernel boot parameter, but I just haven't found it.
View 3 Replies
View Related
Aug 26, 2010
I have been having a lot of problems with disk errors and want to find a solution or more stable distro. I can not post the link yet since I am new but it is in the Ubuntu section of this forum and titled "Hibernate or spin down or hard shutdown causes errors." I am running Ubuntu 10.4 64bit on an AMD64 2.2gh.
I have been doing my research about distros and know a bit about what is going on with Linux. Sort of transcending past newbie I think. But I want to know what is the most stable distro for the least amount of Disk errors, or how to get ubuntu not to have so many errors. Maybe install the 32bit version? I want something fast and simple where I can run gimp/inkscape/openoffice/and maybe some of the video editing packages like Kino/piviti/cinerella.
View 4 Replies
View Related
Sep 27, 2010
Code...
but 'top' shows 2GB of swap...
top - 18:38:42 up 4:22, 5 users, load average: 0.54, 0.61, 0.64
Tasks: 369 total, 1 running, 368 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.4%us, 1.4%sy, 0.0%ni, 86.9%id, 3.4%wa, 0.0%hi, 0.9%si, 0.0%st
Mem: 33265832k total, 24859468k used, 8406364k free, 379892k buffers
Swap: 2031608k total, 0k used, 2031608k free, 2030328k cached
Why is that?
View 6 Replies
View Related
Jul 15, 2010
Possibly related to this previous question, I would like to be able to run a task for a specified amount of time, then stop/kill it, then start it again. Specifically, I run the Folding@Home application on my Linux workstation. Periodically, it will have trouble logging-in to the home server, and will sit idle for a long time, but not release memory/resources it has claimed (yes, I realize this is likely a bug in the tool, but I can't fix that currently). Typically just the act of killing and starting the tool will allow it to check-in again. So, I would like to be able to run something like:
run_for <time> ./fah6
Does such a tool exist, or should I write a wrapper than nukes the fah6 client after, say, a week and restart it?
View 4 Replies
View Related
Jun 12, 2011
I have just purchased a 2TB drive for my server and I was trying to get an idea of the differences between these file systems or other file systems out there. What is the amount of space after formatting for ext4, ext3, and ntfs?
View 4 Replies
View Related
May 5, 2010
I have a first generation iPod Shuffle (yes, I know it's old) with 512 megabytes of space (feel free to laugh). I also have arch linux installed on my computer, with a music folder containing about 30 folders full of music. This totals to about 2 gigabytes of music.
What I want to do is: create a script that moves no more than 512 megabytes (it can be slightly under this amount, but NOT over) of random songs from my music folder (and it's subsequent artist/album folders) to a separate folder. I will then use gtkpod to move those random songs in the new folder to my iPod Shuffle.
View 6 Replies
View Related
Mar 11, 2010
I am connected to a network via SHH. Now, i know how i can see which users are logged on as well, but how can i see how many times each user has connected? this refering to users that have logged on at least once
View 7 Replies
View Related
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
Aug 5, 2011
These following ext3 partitions contain identical data. As we can see, the larger the partition size, the more space is required for the same files:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop11 3965777 561064 3199964 15% [...]
/dev/loop19 573029 543843 29186 95% [...]
[code]....
View 2 Replies
View Related
Jun 15, 2011
I am trying to watch a command and try to log it into a file. I tried
watch -t -n 10 "(date '+TIME:%H:%M:%S'
; ps aux | grep "pattern" | wc -l)" >>
logfile
and am expecting a result like
TIME: 10:32:30 12
TIME: 10:32:40 18
TIME: 10:32:50 2
to be stored in logfile. However, when the logfile has unprintable characters in in. How do I get this kind of output from the command li
View 4 Replies
View Related
Mar 27, 2010
I'm trying to isolate a number from a text file using sed. The text file looks like this:
-GARBAGE-GARBAGE-GARBAGE- Number of frames: 183933 frames Codec -GARBAGE-GARBAGE-GARBAGE-
I tried the following:
Code:
sed "s/^.*Number of frames: //g; s/ frames Codec.*$//g" "info.txt" > "frames.txt"
Strangely, it only seems to be stripping off the end, but not the beginning, like so:
-GARBAGE-GARBAGE-GARBAGE- Number of frames: 183933
I'm obviously not using the command correctly, so what am I doing wrong?
View 8 Replies
View Related
Jun 17, 2011
I have two linux servers, they are backup together.
1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.
2. Server 2 have 3 files with name and path are the same as server 1.
- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.
- see my script as below: it works find now but just overwrite. not check last modified date.
View 1 Replies
View Related
Dec 23, 2009
I have a three year old computer with an 160GB hard drive and 1GB of memory RAM. Would that be enough to run OpenSUSE 11.2?
View 2 Replies
View Related
Mar 4, 2010
if there's a tab-delimited file under /usr/desktop, how can I determine the number of rows and columns of the file in shell?And, if told the the 3rd column of the file contains only numerical values and all values in the 5th column are unique, how can I verify these in shell?
View 13 Replies
View Related
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
Feb 1, 2011
i need to count the number of files and put the output into a variable. i used wc -l filename but i couldnt find an option to put the output to variable. example if the number o line is 5, i need the output of echo $x is 5.
View 3 Replies
View Related
Jun 21, 2010
on creating a new perl script which replace IP address from the text file. eg. If in a file, we found any word like 11.222.333.44 then it has to be replaced to XX.XXX.333.44
View 8 Replies
View Related
Mar 20, 2011
I need to change all number 10 in a text file to word form, or in short from 10->ten. the thing is number 10 including in dates such as 10/22/1997 or 03-10-2011 should not be changed. im having some trouble because the file contains numbers like "price range from 10-50k".
this is just a sample.
name: john smith
birthday: 10-11-1995
date hired: 05/10/2010
expected salary: 10-50k
typing speed: 10 wpm
[Code].....
Using sed command is it possible to change like this..
View 11 Replies
View Related
Feb 14, 2009
I will be upgrading my RAM soon. What is the maximum amount of ram a 32bit OS can see?
View 14 Replies
View Related
Mar 24, 2010
What command do I enter to show the amount of RAM I have? I just upgraded and have to do a check.
View 3 Replies
View Related
Feb 28, 2010
What is the minimum amount of processes that can be run and still keeping stable? I have what looks like over 100 processes running and my computer is lagging pretty bad. Attached is an output of
Code:
ps -A
And it comes and goes with the cpu usage. cpu1 will run at like 9 or 10 percent idle while cpu2 will run at 100 percent all the time. I am not sure whats going on. But id hate to have to start from scratch again begins I just got it set up the way i want it. And the network activity keeps having spikes when I am not online. I've scanned with multiple port scanners and nothing seems out of the norm.
View 4 Replies
View Related
Jun 16, 2010
When I installed Ubuntu(with W.U.B.I) it gave a set amount of space, unfortunately I have come near the end of the set 15GB's I was just wondering if there was a way to increase the amount of space ubuntu can use
View 9 Replies
View Related