Hi,
i need to copy contents from source to destination with a few conditions, Please helpme out.
Sample input file
(d can be either a file or directory)
my conditions are:
check if destination is valid and if its a file or directory
if its a directory(i.e source is a new file and does not already exist), copy the source(file) to destination
if its a file(there s a file with the same name as source file), take backup and copy the source(file) to destination
if not both, print error msg
Here is what i have tried:
But this doesnt seem to be working. Please help
Is there only one line in your file testfile.txt, well if that is the case then it will work.
But, if you have more than one line then you need to go for looping [preferrably while loop] and read one line at a time and execute the code you have on it.
I am logged into AIX 6.1 as a root user. I tried copying about 190GB of data to a different folder.
cp -R /u01/data/scope /CY/backup
I got the message:
cp: Requested a write of 4096 bytes, but wrote only 3584.
When the copy operation completed, I checked the /CY/backup/scope folder and... (3 Replies)
I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file .
file.txt
900.00000 1 1 1
500.00000
500.00000
100000.000
4
4
1.45257346E-07 899.10834 ... (4 Replies)