I am a complete noob. I would like to create a shell script in centOS7 that does these 3 steps and I don't even know where to begin :
Run somepythonscript.py in currently opened directory (folder) in terminal. (The python script will create
.dat
file calledNCS.dat
inside this directory)rename the file
NCS.dat
with name of the folder that is 2 levels above (so if the path to the file isFolderName1/FolderName2/NCS.dat
I want theNCS.dat
be renamed toFolderName1.dat
)move the renamed
.dat
file to some other random folder X.
Hope I made it clear. Thank you in advance!