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
I need a function in shell scripting to move the files as below.
-Move file from FolderB to FolderC
-Delete file from FolderA
Thanks
ASKER
Hi Ozo,
Can you please let me know how to do this in a function in shell script ?
Thanks
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
mv FolderB/file FolderC
rm FolderC/file
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
rm FolderC/file