I want to go in the directory on the basis of highest directory number.
/home/cg/root/2018/01. Inside this path I have multiple directories as below
15 16 17 So on..
In this case highest directory is
17 so I want to move in
17 directory... If a directory named
18 exists then want to go in
Is there any way which can be done using the
cd /home/cg/root/2018/01/$(ls |tail -1)