Hi,

I'm new to shell scripting. Can someone please suggest me some syntax to move files from directory A to directory B using shell scripting.

Also the programme should have 2 parameters and based on the parameter values given while executing, the programme should check the file names in directory and compare the letters from 3 to 7 to match the first parameter given to the shell script programme and 10 to 15 to match the 2nd parameter given in the programme and if both of them matches, then they should be moved to directory B.

I'm not expecting the entire code but atleast some suggestions would be great!!

Thanks a lot in advance

Akhil

mv

mv /dir1/* /dir2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.