Skip to content

Using the sed command in Singularity Exec does not work. Similar with Redirect ">" symbol. #101

@jjacobson95

Description

@jjacobson95

Command line works as expected:
singularity exec --writable-tmpfs instance://reclusive_cat_2780 sed -i 's/REPLACE_THIS_LINE/ <parameter name="Raw data file names"><file>\/Work\/III_mzML\/Dorrestein_GnPS_P14_G10_7V_Rep01_Neg_29Dec20_Fiji_Infusion_Min50_MA-csum-Min20_3.mzML<\/file><\/parameter>/' /Work/MZmine_FeatureFinder-batch.xml

Python Command doesn't work:

file_name = "test_file"
command_list_1 = """sed -i \'s/REPLACE_THIS_LINE/        <parameter name="Raw data file names"><file>\/Work\/III_mzML\/""" +file_name + """<\/file><\/parameter>/\' /Work/MZmine_FeatureFinder-batch.xml"""`

Client.execute(myinstance,command_list_1, options=['--writable-tmpfs'],quiet=False)`

Error message:
/bin/sed: -e expression #1, char 1: unknown command: `''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions