#!/bin/bash

# Author: Inger Helene Karset
# Date: 20182702
#
# Run like this: 
# ./RENAME.sh
#
# Description:
# Rename all files in one folder. Replace the first part of
# the filenames with firstpart_new. Keep the last part
# (everything from .cam.h0 and out)

firstpart_new="PDAER_PDENV_STD"

for f in *.nc
        do
		lastpart=${f:34:27}
		mv $f "$firstpart_new$lastpart"
	done
