Hello,
I just want to know how If it's possiple to define 2 variable using foreach command ???
I have directory inside that directory around 1000 file, I want to rename all of this files to something I have it in a list. Example :-
------This is what in my directory----------
d1
d2
d3
d4
d5
------------------------------------------------------
I have a LIST which containe the new naming "more new_name" and I have this
omd1
omd2
omd3
omd4
omd5
I tried to do crazy way to done it :-
# ls mydirectory >> old_name
# foreach file (`more old_name`) file2 (`more new_name`)
mv $file $file2
end
I know this is crazy but I don't know how to do it
Please do help me