BASICS OF BASH

Variables available

Available variables are :

Which produces for example :

The basics of basics

cd $PathSsh
for f in *.csv; do mv "$f" "$PathRepo"; done
for f in *.txt; do mv "$f" "$PathRepo"; done
for f in *.xls*; do mv $f "$PathSshexcel"; done

⚠️ Be carefull, macro excel does not accept XLS. You have to rename it

for f in *.XLS*; do newf=$(echo "$f" | sed -e "s|.XLS|.xls|"); mv "$f" "$newf";done

Bash cheatsheet

Some basic commands to help you : here

Was this article helpful?

Powered by Zendesk