General :: Mapping With Series From Master File And Calculate Count?

Sep 7, 2010

My shell script is calculating the count of each shortcode series wise whose sample output is as follows:

Code:

56882
9124 1
9172 1
9173 4

[code]....

View 1 Replies


ADVERTISEMENT

General :: Count How Many Number Occurrences In Series?

Jun 2, 2011

i try to make a script in bash that u choose a number for example 501 and another number like 1 and find how much the 1 number repeat in all numbers from 1 to 501 for example 11 -->1 repeat 2 times.in 1 to 501 the number 1 repeat 200 times.

View 4 Replies View Related

General :: Grep String From Logs Of Last 1 Hour On Files Of 2 Different Servers+calculate Count?

Sep 3, 2010

I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows:

Code:

27-Aug-2010 10:04:30,601|919122874903|phtunes_app|1282243292627|NotifySmsReception|DMGenerateLogInterceptor - ExternalTransactionID:SDP-DM-26713018, TransactionStatus:Requested
27-Aug-2010

[code]....

View 6 Replies View Related

General :: Grep A Series 98782 From A Group By Series In A File?

May 24, 2010

i have to grep a series say 98782 from a group by series in a file ,how can i grep the series.

View 6 Replies View Related

General :: Looping Through Csv File To Calculate Avg/min/max?

Sep 1, 2010

I have a csv file (id, loc, timestamp, impressions) that I need to derive some low-level calculations from. Im ok with basic sort and grep operations, but this one is challenging my feeble scripting skills (normally I�d throw it into a spreadsheet, but in this case Id like to ultimately create a script that I could automate). Ive already used cat/sort to order the csv file first on location and then timestamp so it looks like this:

Abt001, AA, 2009-01-01 10:51:00, 231
Cup002, AA, 2009-01-01 10:54:00, 3
Saf001, AB, 2009-01-01 10:51:00, 25

[code]....

What Id like to do is output to file a record of the total, min, and max number of impressions for each location. , e.g.

AA6504 3231
AB252525
AC37925109
ZZ35512341

how to do this and Im kind of stuck on how to approach it I think the combined steps of looping through the locations along with the min/max/sum calculations are throwing me. Eventually Id also like to do additional calculations like average, ect. but I think I can figure that out on my own if I can just get this part down.

View 10 Replies View Related

General :: Parse File From Remote Server To Caculate Count Of String Existence In That File?

Aug 30, 2010

I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files.Say a file abc.log exist on 2 servers.I want to search for string "test" on both files and calculate the total count of search string's existence.For example if file abc.log on server 1 has string "test" 2 times
and file abc.log on server 2 has string "test" 4 times.then the output will beStringName : Countexampletest : 6 timesNote : I have created the password less connectivity using ssh-keygen.

View 2 Replies View Related

General :: Get Output File From A Master File?

Aug 3, 2010

having following problem in linux environment.I have a following basic file with name " BASEFILE", as shown example below :

sl.no pol.no name status loan
1 123 rama FORCE 500
2 234 jama LAPSE 800

[code]...

View 12 Replies View Related

General :: Command To Count All Characters In File

Mar 26, 2010

Anybody know and command to count any characters in file? I would like to know the total number of character " (quote) in file. My idea is to check if in a script the total number of this character is pair.

View 4 Replies View Related

General :: Count An Item In A Tab-delimited Txt File?

Mar 6, 2010

in a tab-delimited file, such as:

Code:
111aIab
222bIIbc

[code]...

View 3 Replies View Related

General :: Showing The Line Count Of A Specific File

Mar 30, 2011

Is this the correct way to show the line count of a specific file?

cat file | grep * -c

View 3 Replies View Related

General :: Splitting Text File Into Several Parts By Line Count

Sep 21, 2009

I have a utility that works with files. The utility is crashing at after about 120 files. The input to the utility is a file containing a filelist. I want to cut the file with the file names in it to seperate files containing about one hundred or so. My thought was to determine the number of lines/100 and then use head and delete to create temporary files to run the utility multiple times to prevent the crash. When I tried to create a variable using the wc -l command the output gives me the number of total lines but it also includes the filename of the input file. (873 Filename.txt) I can not figure out how to remove the Filename.txt from the variable.

View 2 Replies View Related

General :: How To Find The /dev/Device Mapping For NFS File System In RHEL

Jun 19, 2010

Found the below from RedHat Knowledgebase

The Completely Fair Queuing (cfq) scheduler in Red Hat Enterprise Linux 5appears to have worse I/O read performance than in version 4. It appears as though the Completely Fair Queuing I/O scheduler (cfq) has a regression and thus exhibits reduced read-side throughput which can affect performance for both local and NFS mounted file systems.

One way to mitigate this is to set the cfq's slice_idle parameter to zero. To change this value, execute the following command echo 0 > slice_idle in the /sys/block directory appropriate for your situation, as shown below:

echo 0 > /sys/block/hda/queue/iosched/slice_idle

We are using NFS file systems in RHEL 5.3. I would like to know how to find which /dev/Device is being used by the NFS file systems, so that I could try setting the slice_idle to '0' to see if there is any difference in performance? In /etc/fstab I only see the actual NAS volumes for the NFS file systems.

View 2 Replies View Related

General :: FTP Client As Like FTPS On Windows - Reading Series Of Ftp Commands From A Txt File

Apr 20, 2011

I am very new to Linux and trying to learn the shell scripting. Just to know is there any client in linux which does the same task as FTPS on windows. FTPS on windows can read series of FTP command from a txt file and execute them. Is there any way to do that same task, i mean reading series of ftp commands from a txt file, on linux suing shell or perl (any module)?

View 2 Replies View Related

General :: Count The Number Of Lines Inside A File And Put The Output Into A Variable?

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

General :: Identify File Types - Command Line Arguments - And Count - How Many Of Them Are Regular Files

Feb 20, 2010

Write a script that will take a list of filenames as arguments and output a count of how many of them are regular files, and how many of them are scripts (if the file is executable, it will be assumed to be a script file)

Counts always come back as 0

View 5 Replies View Related

Programming :: DBD::mysql::st Execute Failed: Column Count Doesn't Match Value Count At Row 1

Feb 24, 2010

I have the following perl/DBI script:

Quote:

#!/usr/bin/perl
use DBI;
my ($db, $user, $pw) = ('dbname', '****', '***********');
my $dbh = DBI->connect("DBI:mysql:$db",$user,$pw) or die "Cannot connect to $db: $DBI::errstr

[code].....

The error message is

[Wed Feb 24 13:03:27 2010] myscript.cgi: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at myscript.cgi. [Wed Feb 24 13:03:27 2010] myscript.cgi: DBI::db=HASH(0x8a30c60)->errstr

View 2 Replies View Related

Red Hat / Fedora :: No Sound With Intel Corporation 5 Series/3400 Series?

Nov 12, 2010

I have a problem with the latest Fedora. Installed it cleanly on a machine with Gigabyte H55M-S2 with Intel Core i3. There seems to be no sound and I checked to see if anything is muted but is not. The manual says that the sound chip is ALC888B so this could be the first problem. Any ide how I can make it work? Here is a dump of some things on my system.

Code: [weaz ~]$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
[weaz ~]$ uname -a
Linux EarthwormJim 2.6.35.6-48.fc14.i686 #1 SMP Fri Oct 22 15:34:36 UTC 2010 i686 i686 i386 GNU/Linux

[code].....

View 6 Replies View Related

Server :: Local Master Browser Do Not Sync Their List With The Domain Master

Nov 13, 2009

I'm managing a residential network. Each flat is its own subnet, and can only communicate with the other flats through a router (i.e. no broadcast). 95% of these 300 subnets only contains windows computers (from lambda users).

My final goal is to be able to browse the entire network from any computer.

I set up a samba server acting as a wins server, and every computer is aware of it because it is registered in the dhcp. So name resolution is working fine for everyone.

The same samba server is set to be the "Domain master browser":

workgroup = WORKGROUP
wins support = yes
prefered master = yes
local master = yes
domain master = yes
os level = 65

When I browse the network (using "net view" or "browstat view"), I can only see the servers which are in the same subnet as the domain master browser.

Now, when in a subnet the computers arrange themselves to find a "local master browser", the only visible computers are the one in that subnet.

What I don't understand is why all the local masters don't synchronize their lists with the domain master.

So, to sum up, every subnet get the following behaviour:

-if a local master is elected, the only visible computers are the one in the same subnet.

-if no local master is elected, the only visible computers are the one in the subnet of the domain master.

-if I add another samba, configured as a local master winning all elections, then the magic is working and the lists are synchronized.

What is expected:
-every computer can see all the computer from all the subnets.

View 1 Replies View Related

Programming :: Calculate Flash Memory End Address Of A Certain File?

Mar 9, 2011

how to calculate (if possible) the end address of an image file in a flash memory. I'm trying to create a checksum and checkheader function and the info that I got is the file's offset, how many sector it consumes and its size. I kinda need the end address, sad thing is, I don't know how to calculate it.test.img's start address is 0, the size is 0x20000 and consumes 3 sectors.

View 6 Replies View Related

Fedora :: Mapping The File In Memory?

Feb 2, 2010

I need to read many files very fast: reading them from the disk leads to bad performance!!I copied the files into /dev/shm, being sure that they were copied in memory, but the performance didn't improve.Then I created a tmp file system in /mnt (/mnt/tmpfs) and I mounted it withmount -osize=400m tmpfs /mnt/tmpfs -t tmpfsand copied the file in. But the performance still remain almost the same.I've the doubt that I didn't copied the file in memory!The question is: Did I make the right things?I run a FC 11 64 bit on a dual procs server with 16 Gb memory

View 1 Replies View Related

Ubuntu Networking :: File Sharing And Mapping To Win XP

May 6, 2011

I have 4 computers/users and we need to put all the files on a central server. The server is running Ubuntu 10.04. What is the best way for these 4 XP users to see the files that will be stored on the server?

Or basically, how will I either share or map the files *from* Ubuntu *to* XP? Also, the users will be reading, writing, creating and deleting files on the server.

View 3 Replies View Related

Ubuntu :: Corrupt Master File Table?

Jul 22, 2011

On my backup drive I can no longer see any files. According to Testdisk program the master file table (MFT) is bad. How do I restore or rebuild the MFT?

View 3 Replies View Related

Programming :: Substitute Text From Master File?

Mar 29, 2010

i have a PHP program, it encompasses about 200 scripts. Years ago, it was rewritten by another programmer to be multi-lingual, but the multi-lingual attraction of it never took off. Now that I am the only maintainer, trying to reuse what I have for code is quite difficult. If I look at one script, I see items like

_HEADER_TEXT_ERROR_4
_TABLE_ROW_SIZED_FORMAT
_ERROR_SELECT_RADIO_MAIN

All of these (and many more) are found in a "main.php" file that sort of go like this:

DEFINE _HEADER_TEXT_ERROR_4 "You Entered a Bad Value";
DEFINE _TABLE_ROW_SIZED_FORMAT "Last Name";
DEFINE _ERROR_SELECT_RADIO_MAIN "Make Your Selections";

What I would like to do is have something that says FOR all files in this directory, when you find something that starts with _, find that value in main.php and substitue what is inside the quotes for that value. Sort of unwriting all this multi-lingual stuff. I can format how I would do it if it was all stored in MySQL, but doing it from bash has me perplexed.

View 11 Replies View Related

Ubuntu :: Count The Number Of Lines That Are Unique To The File?

Jan 21, 2010

I recently found myself in possession of a large file (a few million lines in length) of short strings and would like to count the number of lines that are unique to the file. I thought this would be an easy process, but while working on the problem, I encountered the following. Can anyone explain this weird result to me?

Code:
alaric@alaric-laptop:~/Documents/Programming$ grep '^string$' file.txt | uniq | wc -l
1

[code]....

View 1 Replies View Related

Red Hat :: Count How Many Backups Are Successful/failed Based On The File

Jun 28, 2010

I just wanted to count how many backups are successful/failed based on the file. My file look like following..Quote:

# Directory Backup was successful on server1
# Directory Backup was successful on server2
# Directory Backup was failed on server3

[code]....

View 4 Replies View Related

Security :: ID Mapping In A AD Integreated File Server Cluster?

Feb 19, 2010

Posted in wrong section. Moved to Linux Servers Forum.

View 2 Replies View Related

Server :: Distribute Securenets File From NIS Master To Slave?

Jan 25, 2011

I have a large environment with many VLANs and NIS slaves serving the VLANs. Previously we have not used a securenets file (don't worry; we don't use NIS for passwords, just NFS maps), but I'd like to start. The number of NIS slaves makes it annoying to update a securenets file on each when we add a new VLAN. Is there a way to propagate the securenets file to each slave when I update it on the master?If not, I guess I can live with propagating the file once and only visiting new slaves when I build them, because in 99% of cases a NIS slave only serves its own subnet.

View 1 Replies View Related

Software :: Postfix - Master Is Dead But Pid File Exists?

Dec 21, 2010

When I check the status of postfix I get this error..... what does it mean and how do I fix / troubleshoot it?

View 11 Replies View Related

Server :: Setup Master / Master Mysql In HA Setup Without Use Of Load Balancer Provided By Host?

Mar 31, 2010

I have a load balancer with 2 web servers behind it. The web servers rsync with cloud storage to update their apache directories 1 time every hour. Apache is just running php pages that pull/push data to a DB so they dont need to be updated that often. However I need to figure out how to implement a Master/Master MySQL setup to have my web servers point to for the PHP stuff. I need to implement it without having a single point of failure. The Load balancers are useless for failover as they only detect availability based on Ping request. So putting a master/master setup behind a Load Balancer is out. what is the best way to setup the master/master mysql in a HA setup without the use of a load balancer provided by the host?

View 2 Replies View Related

Ubuntu Servers :: Permission Denied Dumping Master File?

Mar 21, 2011

I am attempting to setup an Ubuntu server as a secondary DNS server. It seems whenever it tries to dump the master file the system log shows Permission denied.let me know if more information is needed.NOTE: where it says example.com I have simply removed my actual Domain name.

Mar 21 21:49:24 ulinux named[14418]: zone example.com/IN: Transfer started.
Mar 21 21:49:24 ulinux named[14418]: transfer of 'example.com/IN' from 192.168.0.15#53: connecte$

[code]....

View 1 Replies View Related







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