csvtool does not call exported bash function

Bug #1177172 reported by zasran on 2013-05-07
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ocaml-csv (Ubuntu)
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.

Launchpad Janitor (janitor) wrote :

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

Changed in ocaml-csv (Ubuntu):
status: New → Confirmed
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

Iain Elder (iainelder) wrote :
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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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