About creation of a subshell, is this behavior specific to linux? I didnt have this problem before. Or is there something I can do to mitigate these differences (as you mentioned that they are shell fundamental)?
No, this is a fundamental shell behavior - irrespective of the OS.
As I said, what you quoted for reading a pipped input to 'read' does not work on Sun/Solaris' ksh.
An alternate paradigm is the following:
I'm very new to all of this, so I apologize in advance if my post comes off incoherent, or terms aren't used correctly :rolleyes:
Using Fedora Core 2, I set up am internal DNS name server. After setting up the named.conf, and the localhost files I was able to correctly resolve my host name... (3 Replies)
I want to access window file system through Samba. when i ping Window machine through linux machine it connect, but in reverse case it shows "Request time out". could any one suggest what problem may be. (1 Reply)
Hi All,
I was trying to ftp multiple files from my windows to my linux box, everything gets transfered but unfortunately some of them are corrupted.
I found out that some of the files are in Ascii and some are binary, but since most of the files I'm trying to send are Ascii...the big ones... (2 Replies)
we are using redhat linux,configured the postfix as mail server and outlook is used as mail client.whenever the user opens outlook it is start downloading all the mails from the server.
Example : If a user has 50 mails in the server,whenever he opens the outlook the outlook will start... (0 Replies)
we are receiving following error in our application server & server not booted:-
"INIT IP ID x ,Respawning too fast; disable for 5 minutes."
Please give me solution for above mention problem as early as possible .
AKM (3 Replies)
Hi all,
I have no root access enabled on our linux server due to safety issues. We use sudo. When I change my password using passwd command, I sometimes get issues where I can't log back in.
Pam_Tally disables due to trying my password too many times. So someone in my group has to reset... (7 Replies)
I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning.
The script is called cwrmail.pl and is located in my cgi-bin.
When I... (9 Replies)
I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd"
i am trying in this manner "
ssh username@servername "cd... (5 Replies)
Hi my name is Manju.
->I have configure the two way authentication on my linux server.
->Now I am able to apply two way authenticator on particuler user.
->Now I want to map this linux server to my AD server.
->Kindly tell me how to map AD(Active Directory) with this linux server.
... (2 Replies)
I am facing a strange issue in connecting to Oracle database from Linux Machine
- The connectivity is not failing all the time , the failure to success ratio is 1:70.
- Error "ORA-12545: Connect failed because target host or object does not exist"
- Majority of the time the connection... (6 Replies)
Discussion started by: balaji kumar
6 Replies
LEARN ABOUT PHP
splfileobject.fputcsv
SPLFILEOBJECT.FPUTCSV(3) 1 SPLFILEOBJECT.FPUTCSV(3)SplFileObject::fputcsv - Write a field array as a CSV line
SYNOPSIS
public int SplFileObject::fputcsv (array $fields, [string $delimiter = ","], [string $enclosure = '"'], [string $escape = "
DESCRIPTION
Writes the $fields array to the file as a CSV line.
PARAMETERS
o $fields
- An array of values.
o $delimiter
- The optional $delimiter parameter sets the field delimiter (one character only).
o $enclosure
- The optional $enclosure parameter sets the field enclosure (one character only).
o $escape
- The optional $escape parameter sets the escape character (one character only).
RETURN VALUES
Returns the length of the written string or FALSE on failure.
Returns FALSE, and does not write the CSV line to the file, if the $delimiter or $enclosure parameter is not a single character.
ERRORS /EXCEPTIONS
An E_WARNING level error is issued if the $delimiter or $enclosure parameter is not a single character.
CHANGELOG
+--------------+-------------------------------+
| Version | |
| | |
| | Description |
| | |
+--------------+-------------------------------+
|5.5.21, 5.6.5 | |
| | |
| | Added the $escape parameter. |
| | |
+--------------+-------------------------------+
EXAMPLES
Example #1
SplFileObject::fputcsv example
<?php
$list = array (
array('aaa', 'bbb', 'ccc', 'dddd'),
array('123', '456', '789'),
array('"aaa"', '"bbb"')
);
$file = new SplFileObject('file.csv', 'w');
foreach ($list as $fields) {
$file->fputcsv($fields);
}
?>
The above example will write the following to file.csv:
aaa,bbb,ccc,dddd
123,456,789
"""aaa""","""bbb"""
SEE ALSO fputcsv(3), SplFileObject::fgetcsv.
PHP Documentation Group SPLFILEOBJECT.FPUTCSV(3)