Skip to content

Instantly share code, notes, and snippets.

@JesperDramsch
Last active December 23, 2015 10:49
Show Gist options
  • Save JesperDramsch/6624129 to your computer and use it in GitHub Desktop.
Save JesperDramsch/6624129 to your computer and use it in GitHub Desktop.
This moves the "Print Flow" Output of Promax to a predefined Output Path
#! /bin/bash
#
# Define environment
Machine='[Machine Name]'
User='[User Name]'
PromaxData='/Promax/ProMAX/data/[Project Name]/[Line Name]'
OutData="[Output Path]"
# Read number Code of flow. I usually introduce initial numbers for my workflows.
echo 'Please input code number of flow in Promax:'
read lorem
# Read data name of file
echo 'Please input file name for output:'
read ipsum
# Copy Files
echo 'Files copied'
ssh $Machine -X -t "cp ${PromaxData}/${lorem}*/packet.html ${OutData}/${lorem}_${ipsum}.html;ls -Al ${OutData}"
scp ${User}@${Machine}:${OutData}/${lorem}_${ipsum}.html /tmp/newflow.html
# Open Files
echo 'Files opened in firefox'
firefox /tmp/newflow.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment