Fish Alias/Function Location
Tagged with: alias, fish, function, Linux, location, shell, store
Saturday, January 5th, 2008 10:08 PM
The alias/function of the fish shell are stored at ‘/home/username/.config/fish/functions’
The alias/function of the fish shell are stored at ‘/home/username/.config/fish/functions’
Fish shell has an easy method to create a command alias…
alias del='rm'
save_function del
Prints all the arguments of the function. This function uses console.log if firebug is available - else, uses alert.
function p() {
for(var i=0; i<<arguments.length; i++) {
if(window.console) console.log(arguments[i]);
else alert(arguments[i]);
}
}
Functions to Export and import CSV data using PHP
//*Get the result of the query as a CSV stream.
function CSVExport($query) {
global $sql;
$sql_csv = $sql->getSqlHandle($query);
header("Content-type:text/octect-stream");
header("Content-Disposition:attachment;filename=data.csv");
while($row = mysql_fetch_row($sql_csv)) {
$row = $sql->_stripsls($row);
print '"' . implode('","',$row) . "\"\n";
}
exit;
}
[tags]php,export,import,csv,function[/tags]