csvtool does not call exported bash function

Bug #1177172 reported by zasran
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ocaml-csv (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

csvtool man page claims that csvtool call would call exported bash function if it was exported using export -f.

However it does not work (assumes function hello that just echos 'hello'):

# not exported yet
$ bash -c hello
bash: yo: command not found
$ export -f hello
# verify export worked
$ bash -c hello
hello
# now try to use csvtool as described in the man page
$ csvtool call hello /some/file
sh: 1: hello: not found
hello: terminated with exit code 127

Per manual page the above should work.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ocaml-csv (Ubuntu):
status: New → Confirmed
Revision history for this message
Iain Elder (iainelder) wrote :

In the meantime you might want to look at the csvkit suite.

"csvkit is to tabular data what the standard Unix text processing suite (grep, sed, cut, sort) is to text."

http://csvkit.readthedocs.org/en/latest/

Krzysztof Dorosz released an extension called csvpys that can compute arbitrary Python expressions over each row.

https://github.com/cypreess/csvkit/blob/master/docs/scripts/csvpys.rst

Revision history for this message
Iain Elder (iainelder) wrote :
Revision history for this message
ChriS (christophe-troestler) wrote :

This is because /bin/sh is used to run commands and this is no longer /bin/bash

I commited a fix and released version 1.3.3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.