Link to home
Start Free TrialLog in
Avatar of magento
magento

asked on

Shell help1

Hi ,

I need a function in shell scripting to move the files as below.

 -Move file from FolderB to FolderC
 -Delete file from FolderA

Thanks
Avatar of ozo
ozo
Flag of United States of America image

mv FolderB/file FolderC
rm FolderC/file
Avatar of magento
magento

ASKER

Hi Ozo,

Can you please let me know how to do this in a function in shell script ?

Thanks
#!/bin/bash
mv FolderB/file FolderC
rm FolderC/file
Avatar of magento

ASKER

Hi Ozo,

I am sorry for the confusion.

I thought of using this in many places in the code so if its a function , i can call it whenever necessary.
If u advice only command to be called in if needed, then i can use commands only.

Thanks
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial