Red Hat :: Awk Function For Parsing Files?

Nov 8, 2010

I am trying to parse this file and wld appreciate some assistance:

FILENAME=XUXESS.TXT
RECORD=44
S_KEY=

[code]...

View 4 Replies


ADVERTISEMENT

Ubuntu :: Apache Not Parsing Php In Html Files?

Dec 10, 2010

why Apache is not parsing php code inside html files in LAMP? Whereas the same is working fine in WAMP..

View 6 Replies View Related

Programming :: Parsing Text Files In Bash / Cant Seem To Read The Array Back?

May 29, 2011

PI'm trying to write a script to list all open ports in the MINIUNPND chain in iptables and use the procotol, port and destination ip to open ports on another router using upnpc.Here is the output of iptables -L MINIUPNPD

Code:
>iptables -L MINIUPNPD
Chain MINIUPNPD (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 192.168.3.124 tcp dpt:19955
ACCEPT tcp -- anywhere 192.168.3.124 tcp dpt:20054
ACCEPT tcp -- anywhere 192.168.3.130 udp dpt:10654
ACCEPT tcp -- anywhere 192.168.3.121 tcp dpt:29955
code....

No matter what i do i cant seem to remove the first 4 characters from the MYPROT array to leave only the digits. Also i cant seem to read the array back???

I thought it would simply be a loop reading each line and passing the fields in variables, executing upnpc commands i need then moving to the next line of the file until it reached the EOF.

View 12 Replies View Related

Programming :: Bash Function For Searching Files ?

Jun 15, 2011

I'm making a small script for searching and doing some operations with photos, but I'm kinda stuck on this little function:

Code:

function findallformat {
prefix=""
if [ $1 = -pre ] then

[code]....

That function should find for every file with a certain type; and you can specify a prefix using a "-pre" followed by the prefix that you want to search. The format should be "stackable", so you can use as many types that you want, without repeating the same function on the code.

Example: findallformat -pre IMG_ .JPG .CR2 #That should search files that start with "IMG_" and finishes with .JPG and .CR2. My problem it's that, when I try to use it on the script, it says "bash: syntax error near `token' unexpected `}'"

View 4 Replies View Related

General :: Using Chmod(), Function To Set Permissions For My Files/directories?

Feb 16, 2010

I am using chmod(), function to set permissions for my files/directories.How can I set -R flag for it???

View 4 Replies View Related

Fedora :: Cannot Save Files In Codeblocks IDE Nor Can Get Eric IDE To Function Either?

Dec 31, 2009

I can not get many things to work as I have no way to access root priveledges in Fedora 10. I tried before to install fedora 11, then 12 and hit roadblocks. The problem was both went through long installation times and then simply said not enough space in boot file. I then tried to remove images as it said and could not boot at all as I received an error saying something like file missing and it returned me to the boot screen. I then reloaded fedora 10, went through the over 700 ! security upgrades and set it all up. My problem is several things I try to set up I need root priveledges to setup. I can not save files in codeblocks IDE nor can I get Eric IDE to function either, also the same with a neat looking game sauerbraten.

I am happy with Fedora 10, everything works on the hardware side, my cdma sprint net connection works flawlessly, even my wirless works most times. I can not get to root at all, when I try to use the sudo ed it asks me for a password for ed then returns ed is not in sudoers file this incident will be reported. I tried sudo root and it asks me for root password and I give it correctly three times and then it says 3 incorrect attempts and exits. I can not get into sudoers file to edit as I have no permissions. I set up another user and group with id 101 (lowest I could use) and included all the groups in root - halt, shutdown, root etc and when I switched users and tried to access root as Edward no permissions again. I then tried sudo Edward and it asked for my password again, I used the proper one and still got the message Edward is not in sudoers file this incident will be reported. Also it seems to me I should be able to get into root through the switch users, I tried typing in root then the correct root password and that just returns to the prompt again. I know the root password is correct as I use it access the Aunthentication app and the users and groups app and it allows me access to these as root?.

View 3 Replies View Related

Programming :: C++ List Regular Files Function Failing Inconsistently?

Mar 28, 2011

I've got a problem with a piece of code. Basically, I use my listRegularFiles function in two separate places in my code. The first time I run itit appears to work perfectly well. If I use it a second time, however, it blows a gasket. I'll post my code below, and if anybody has any ideas,Here's the code for listRegularFiles:

Code:
string listRegularFiles(char* dirname)
{

[code]...

View 2 Replies View Related

OpenSUSE Hardware :: Multi-function Epson Stylus Sx218 - Can Not Run The Scanner Function ?

Mar 24, 2011

I bought a multifunction stylus sx218 Espon model and I can not run the scanner function. I did some research and found a few solutions and very functional. I hope someone solves the problem. My version of openSUSE 11.2.

View 9 Replies View Related

Programming :: How Can A Friend Function Access A Public Function From A Base Class

Nov 16, 2010

Code:
#include <iostream>
using namespace std;

[code]...

View 1 Replies View Related

Programming :: Passing Data From Interrupt Handler Function To Tasklet Function?

May 18, 2010

I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.

View 2 Replies View Related

OpenSUSE :: Get Function Set_magic_quotes_runtime() To Function On The Newer Versions?

Mar 30, 2011

I'm currently using OpenSuse 11.1 web server. This is bad since 11.1 is no longer supported. the reason why I am using it is because Function set_magic_quotes_runtime() was no longer being used. (so I was told)

That being said, is there a way to get Function set_magic_quotes_runtime() to function on the newer versions of OpenSuSE?

View 9 Replies View Related

General :: Write Script To Use Function And Still Keep Function Active?

Feb 21, 2010

the function terminates if no key is pressed for 10 consecutive seconds. I tried using the -t option as suggested in some forums, but my version of showkey doesn't have the option of changing the timeout. The options I get are:

-h --helpdisplay this help text
-a --asciidisplay the decimal/octal/hex values of the keys
-s --scancodesdisplay only the raw scan-codes
-k --keycodesdisplay only the interpreted keycodes (default).

Is it possible to write a script to use this function and still keep the function active until an interrupt is recieved?

View 6 Replies View Related

General :: "find Files" Function In Konqueror Doesn't Work

Jan 19, 2011

For some reason, my Konqueror can't use Find Files. When I enter the parameters and then click find, the search instantly ends with nothing found, even when I know the item(s) exist. I do have kfind installed, and just tried reinstalling it and Konqueror.

View 5 Replies View Related

Programming :: Bash Array Add Function Example Using Indirect Array Reference As Function Argument?

Jun 20, 2010

I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.

#!/bin/bash
addelementtoarray()
{
local arrayname=$1

[code]....

View 10 Replies View Related

Programming :: Parsing Log File With Awk?

Aug 31, 2009

I have logs files from freeradius that have looks as follows:

$ grep "Login incorrect (rlm_ldap: User not found" /var/log/radius/radiusd-inner-tunnel-20090831.log
Mon Aug 31 09:25:27 2009 : Auth: Login incorrect (rlm_ldap: User not found): [John Doe] (from client oficina port 0 via TLS tunnel)

[code]....

I use the following line to get the amount of users that don't exist on ldap:

Code:

grep "Login incorrect (rlm_ldap: User not found" /var/log/radius/radiusd-inner-tunnel-20090831.log | awk '{print $14}' | sort -fu | wc -l

Now, awk on line one for example parses [John Doe] and [Joon Williams] as "[John" and that it's not what I'd want. I mean how could I do for awk looks username field as closed between squared brackets?

View 1 Replies View Related

Ubuntu Servers :: Apache2: Php Not Parsing

Oct 18, 2010

I've reinstalled my system and installed apache. I've installed php5. 'a2enmod php5' returns with a message telling me that php5 is already enabled.

However, this code does not parse:

Code:
</php
phpinfo() ;
/>

I get a blank page. When I view the source code for the page, I see the php code.

How do I get php to work?

View 3 Replies View Related

General :: The Script To Parsing The Log Message?

Apr 6, 2010

I am working on the script to parsing the log message . the followings are my task:1. Read the multiple log files, such as N1-2009-10-01, N2-2009-10-2, N3-2010-01-02....2. Parse the specific message, such as "aaaa"3. If found the "aaaa" message in the log file and export to excel file PS. i use zgrep:zgrep -a --text "aaaa" * > /home/TTS/myfileand inside file looks like:

N3.2009-11-26-03-05-02.console.log.tar.gz:2009-11-25 20:12:57,429 - aaaa
N4.2009-11-29-00-25-03.console.log.tar.gz:2009-11-28 10:42:18,209 - aaaa
N6.2009-12-01-10-05-02.console.log.tar.gz:2009-12-01 10:00:24,902 - aaaa

[code]....

View 1 Replies View Related

General :: Firefox XMl Parsing Errors

Jun 30, 2011

I keep getting Firefox XMl Parsing Errors(64 bit firefox). It's driving me crazy. Even in safe mode this happens.

View 1 Replies View Related

General :: Parsing A File Into Database?

Jul 14, 2010

parsing the text file in perl.I have very large text file with plenty of columns and rows.how can i parse the file into Oracle database.

View 3 Replies View Related

Networking :: Code For At Commands Parsing In C?

Feb 1, 2010

I want to parse the AT commands using C programmemy problem is to send message using At commands in minicom from one system to other system using socket programmingif i will send here AT on other system it should respond as OK,and if we will send AT+CMGS="ip address" "message", on other system this message has to display can any one please tell me the code in C language

View 1 Replies View Related

General :: Parsing A Binary File?

Mar 17, 2011

Is it possible to parse through a binary file using a script using either Korn shell or Bash

View 3 Replies View Related

Server :: Apache Not Parsing PHP On Ubuntu 8.04?

Sep 2, 2010

I have a new setup of 8.04 with Apache2, MSQL5 and PHP5.However, I can't get the PHP to run. It is NOT the common problem of the browser offering to download the files. In my case I have some PHP in an HTML file, but the PHP is just ignored.

I have played around with my httpd.conf and also php5.conf files, but I couldn't make any difference.

My httpd.conf sets the document root to /var/www and if I put a php file in here with command phpinfo(), then it seems to dispay correctly. My HTML files are /var/www/app/index.html

View 2 Replies View Related

Software :: AT Commands Parsing Code?

Feb 1, 2010

I want to parse the AT commands using C programmemy problem is to send message using At commands in minicom from one system to other system using socket programmingif i will send here AT on other system it should respond as OK,and if we will send AT+CMGS="ip address" "message", on other system this message has to displaycan any one please tell me the code in C language

View 3 Replies View Related

Programming :: Get Group Name From GID Without Parsing /etc/groups?

Sep 14, 2010

Is there a Linux system call that can be used to get the group name from the GID returned by stat()? I realize that I could parse /etc/groups (if my user had sufficient permissions).

View 3 Replies View Related

Programming :: Parsing S-Expressions In Python?

Feb 1, 2011

I've been loosely following this:http://norvig.com/lispy.htmlAnd I have a problem: the parsing function throws an array out of bounds exception. I thought that maybe I'm doing it wrong, so I copy and pasted the code from the page, and still the same error

View 2 Replies View Related

Programming :: Parsing Xml File From A C Program?

Mar 14, 2009

i wanted to know how can I pars a xml file (read data from xml file) and from C program.is there any function to do this for me in C.

View 1 Replies View Related

Programming :: Parsing XML Using Sax Parser In Java

Jul 7, 2011

I'll show the code first:

Code:

What I am after is to get the string text from the clip tags. But for now I just tested to see if it can finds the command tags and print something if it does. But it doesn't find it. Anyone knows why ?

Looks like the xml is not good, i test it with a xml validator:

Code:

View 1 Replies View Related

Programming :: Perl: Parsing A Log File?

Nov 9, 2010

I have a log file (test.log) starting & ending within dash (--) as below. I am looking to write a parser for test.log. This test.log file currently has single value for one Job ID but I wish to parse for repeated N values of different Job ID - Job, User, Queue, Dispatched Date, Dispatched Time, Completed Date, Completed Time, Hosts/Processor, CPU_T and TURNAROUND. I can either output this 10 values in another .log file or dump into cgi.

The selected parameters from test.log for parsing with above 10 attributes are -

--
Job <345010>
User <xyz>
Queue <gaussian>

[code]....

View 3 Replies View Related

Fedora :: Apache Not Parsing Php Pages?

Jan 13, 2010

I have a Cent OS 5.4 32 bit final installed in my dedicated server. I used to run lighttpd with php in my server until now and all was fine. But yesterday I changed my website which needs apache to run. So installed apache using yum install httpd command. Then I added the virtual host name of my domain in webmin panel but when i try to run my php script in browser then its not opening php pages. Instead it downloads php files like index.php when i open in browser. So I guess apache is not able to compile and run php pages. Only html pages are opening right now..

View 2 Replies View Related

Red Hat :: Snmpd Log Error Parsing, Skipping?

Jul 21, 2009

I would like to know if what this log error mean and how i can resolve this matter. I would like to verify if this is a misconfiguration or a bug on my settings

the log error is:

snmpd:error parsing ', skipping

the RHEL version used was 4 update 4 64 bit

the snmp packages installed were:

net-snmp-5.2.1-0.2
net snmp-lib - 5.1.2-11
net-snmp-lib - 5.2.1-0.2

View 1 Replies View Related







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