Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Using PHP to view syslog in private web page Post 303036825 by Corona688 on Friday 12th of July 2019 03:33:39 PM
Old 07-12-2019
You need to watch your quotes and escaping. In PHP this is all one big double-quoted section, and any double quotes inside it must be escaped so they don't end early.

Code:
<?php
$output = shell_exec("tail -n 11 /var/log/_gateway-syslog.log | grep -a iWiSP-Out | awk '{print $8, $9,$10,$11\"   \",$19,\"   \" $15, $16,$17,\"   \" $18,$21, $22}' ");
echo "<pre>$output</pre>";
?>

This User Gave Thanks to Corona688 For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Web page hosting

I built my website based on Dreamweaver, on Windows platform. My server uses Unix, and the page doesn't look too good. Is there any way to solve this problem without too much of a headache? (1 Reply)
Discussion started by: PCL
1 Replies

2. UNIX for Dummies Questions & Answers

view page command?

Hi All, When I run a command on any shell, many times the output is longer than the screen can hold, so I only can see parts of the output. Is there a command that will show me page by page the results of each command? Thanks, Jared (3 Replies)
Discussion started by: JaredsNew
3 Replies

3. Shell Programming and Scripting

View an html page inside zenity

Hi! :) Inside a bash script, I have an html page: "example.html" I need: - read "example.html. - print and view the result for example with dillo (or another light browser) inside zenity with clickable images and links. Some stuff like: zenity --html-info --filename=example.html Is... (0 Replies)
Discussion started by: aspire
0 Replies

4. Web Development

web interface to view,copy,select files

Hi. I have been working on an email backup solution. I need some kind of web admin interface to view , copy & select files in order to restore them. Can someone point me to the right direction? Or do i need to code it from scratch. Something that need a little modification to work is OK. ... (3 Replies)
Discussion started by: coolatt
3 Replies

5. Programming

Need a help in automating the http authenticated web page - via PHP scripting

Hi all, Need a help in PHP scripting. Am automating a process in web page. The process is 1. i have to open that web page using the user credentials (Username and password). 2. select a drop down and click submit button. 3. Then check for the status of the page. Please help me how to... (1 Reply)
Discussion started by: vidhyaS
1 Replies

6. AIX

View OS version within HMC web GUI?

Hello there Im wondering is there any way to see lpar OS info (like 5.3 or 6.1) in HMC web GUI? Because in some situation, the lpar is inactive, the only way to check OS version is to activate, this process takes time :) Tks! (8 Replies)
Discussion started by: bsddaemon
8 Replies

7. Shell Programming and Scripting

Web page with picture, text, php function

Hello. I'm trying to create a web page which the presentation is as follows: 1 °) at the top of page an image 2 °) below the text 3 °) to complete a php function that returns information. I tried different things but none work. Script 1: <!DOCTYPE html> <html> <head> <style> div { ... (5 Replies)
Discussion started by: jcdole
5 Replies

8. UNIX for Dummies Questions & Answers

What is a page from Linux point of view ?

Versions : RHEL 6.xx /OL 6.xx I am trying to understand what a page is in Linux? The concept should be same in Unix as well, I guess The below doc says "A page is a block of virtual memory. A typical block size on Linux operating system is 4KB " ... (4 Replies)
Discussion started by: kraljic
4 Replies
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNamUserpContributed Perl DocumPerl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3pm)

NAME
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames - Use double colon (::) to separate package name components instead of single quotes ('). AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Perl 5 kept single quotes ("'") as package component separators in order to remain backward compatible with prior "perl"s, but advocated using double colon ("::") instead. In the more than a decade since Perl 5, double colons have been overwhelmingly adopted and most people are not even aware that the single quote can be used in this manner. So, unless you're trying to obfuscate your code, don't use them. package Foo::Bar::Baz; #ok package Foo'Bar'Baz; #not ok CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
perlmod AUTHOR
Elliot Shank "<perl@galumph.com>" COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3pm)
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy