01-25-2007
Quote:
Originally Posted by Perderabo
What language are you using? That syntax is not bash or ksh.
my script start with #!/bin/sh and using some command like awk..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I'm trying to display the output of my script in a friendly viewable format.
it's something like this..
i have this while loop... in which i get some records from a file where fields are delimitered with a pipe. so i'm extacting each field and replacing the pipe with a \t, tab !!..
cat... (7 Replies)
Discussion started by: rosh0623
7 Replies
2. UNIX for Dummies Questions & Answers
All,
I have a file ABC.TXT which has two records:
12345 19.93 34.94
12345 94.84 10.48
If do the following command and
grep '12345' ABC.TXT >> test1.txt
If I look at the output of test1.txt I appears as follows:
12345 19.93 34.94 12345 94.84 10.48
I... (5 Replies)
Discussion started by: kingofprussia
5 Replies
3. Shell Programming and Scripting
Hi all, I've written a script which collects some information and sendsout a mail.. (code pasted below)
ssh -l ora${sid} ${primaryhost} "tail -50 /oracle/$ORACLE_SID/newbackup/END_BACKUP.log" |grep 'insert' |tail -1| awk '{print $7}' >> ${RESULTFILE}
Output would look like this:... (1 Reply)
Discussion started by: suri.tyson
1 Replies
4. UNIX for Dummies Questions & Answers
Setup:
Two users, each likely on Windows PCs, using either putty or SecureCRT to connect to a remote Solaris server. The connection could be either telnet or ssh.
Wanted:
How can the output of one users xterm be directed to the other user so that you can easily allow someone to see what... (8 Replies)
Discussion started by: Vi-Curious
8 Replies
5. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
6. Shell Programming and Scripting
Hello Friends,
Hope you are doing well.
I am writing a shell script to find out the log file which are not updated in last 1 hours. I've almost completed the script but need your help in formatting its outputs.
Currently, the output of the script is like this(as a flat row):
... (3 Replies)
Discussion started by: singh.chandan18
3 Replies
7. Shell Programming and Scripting
Hello, i have a problem with the output from my bash program.
I made this program
#!/bin/bash
BESTANDEN=$* # Plaatst bestanden in de variabele BESTANDEN
TMPFILE=xmlprog.sh.$$.$RANDOM # basisnaam voor tijdelijke bestanden
# controller of het programma correct is aangeroepen
if
then
... (6 Replies)
Discussion started by: dutchspiders
6 Replies
8. Shell Programming and Scripting
Hi All,
I have created a sample perl program in one of the unix environment as below
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>";
When I execute it in unix, I get the below
Content-type: text/html
<H1>Hello World</H1>
However, when I... (1 Reply)
Discussion started by: mr_manii
1 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
What single command line would you enter to get the following output?
8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies
10. Shell Programming and Scripting
Hi,
I have the following output of a shell script
k m == -77.2820 (Act=79.9)
i want to display only
k m (6 Replies)
Discussion started by: sreejithalokkan
6 Replies
LEARN ABOUT PHP
pdostatement.debugdumpparams
PDOSTATEMENT.DEBUGDUMPPARAMS(3) 1 PDOSTATEMENT.DEBUGDUMPPARAMS(3)
PDOStatement::debugDumpParams - Dump an SQL prepared command
SYNOPSIS
public void PDOStatement::debugDumpParams (void )
DESCRIPTION
Dumps the information contained by a prepared statement directly on the output. It will provide the SQL query in use, the number of param-
eters used ( Params), the list of parameters with their key name or position, their name, their position in the query (if this is supported
by the PDO driver, otherwise, it will be -1), type ( param_type) as an integer, and a boolean value is_param.
This is a debug function, which dumps the data directly to the normal output.
Tip
As with anything that outputs its result directly to the browser, the output-control functions can be used to capture the output of
this function, and save it in a string (for example).
This will only dump the parameters in the statement at the moment of the dump. Extra parameters are not stored in the statement, and not
displayed.
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
PDOStatement.debugDumpParams(3) example with named parameters
<?php
/* Execute a prepared statement by binding PHP variables */
$calories = 150;
$colour = 'red';
$sth = $dbh->prepare('SELECT name, colour, calories
FROM fruit
WHERE calories < :calories AND colour = :colour');
$sth->bindParam(':calories', $calories, PDO::PARAM_INT);
$sth->bindValue(':colour', $colour, PDO::PARAM_STR, 12);
$sth->execute();
$sth->debugDumpParams();
?>
The above example will output:
SQL: [96] SELECT name, colour, calories
FROM fruit
WHERE calories < :calories AND colour = :colour
Params: 2
Key: Name: [9] :calories
paramno=-1
name=[9] ":calories"
is_param=1
param_type=1
Key: Name: [7] :colour
paramno=-1
name=[7] ":colour"
is_param=1
param_type=2
Example #2
PDOStatement.debugDumpParams(3) example with unnamed parameters
<?php
/* Execute a prepared statement by binding PHP variables */
$calories = 150;
$colour = 'red';
$name = 'apple';
$sth = $dbh->prepare('SELECT name, colour, calories
FROM fruit
WHERE calories < ? AND colour = ?');
$sth->bindParam(1, $calories, PDO::PARAM_INT);
$sth->bindValue(2, $colour, PDO::PARAM_STR);
$sth->execute();
$sth->debugDumpParams();
?>
The above example will output:
SQL: [82] SELECT name, colour, calories
FROM fruit
WHERE calories < ? AND colour = ?
Params: 2
Key: Position #0:
paramno=0
name=[0] ""
is_param=1
param_type=1
Key: Position #1:
paramno=1
name=[0] ""
is_param=1
param_type=2
SEE ALSO
PDO.prepare(3), PDOStatement.bindParam(3), PDOStatement.bindValue(3).
PHP Documentation Group PDOSTATEMENT.DEBUGDUMPPARAMS(3)