#!/bin/sh cd .. last_hash=$(ipfs add -r bideoak|awk '$3 == "bideoak" {print $2}') cd - echo "$last_hash" > ipfs.txt