Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1234551abcde20140718023216001.txt.809047512.2014_07_07_13:47:44
- 000001abcde20140718023216001.txt.34568.001.2014_07_07_13:50:44
- 44444abcded20140718023216001.txt.1111111.2014_07_07_13:47:44
- 1234551abcde20140718023216001.txt.809047512
- 000001abcde20140718023216001.txt.34568.001
- 44444abcded20140718023216001.txt.1111111
- #!/usr/bin/ksh
- file1=`echo 1234551abcde20140718023216001.txt.809047512.2014_07_07_13:47:44 | awk -F "." '{for(i=1;i<NF;i++) if ($i!= 1) f=f?f FS $i:$i;print f;f=""}'`
- echo $file1
- for x in *.txt.*.*; do
- mv "$x" "/other/directory/${x%.*}"
- done
Add Comment
Please, Sign In to add comment