Advertisement
Guest User

Halp

a guest
Jul 12th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.63 KB | None | 0 0
  1. BASH:
  2.  
  3. cat: cat: No such file or directory
  4. for i in ???????*; do
  5. x=`file "$i" | grep -o '".*"' * | sed 's/"//g'`
  6.  
  7. echo mv -i "$i" "$x"
  8. done
  9.  
  10. **************************************************
  11.  
  12. References:
  13.  
  14. Ref 1: https://unix.stackexchange.com/questions/6998/how-can-i-rename-photos-given-the-exif-data
  15. Ref 2: https://unix.stackexchange.com/questions/137030/how-do-i-extract-the-content-of-quoted-strings-from-the-output-of-a-command
  16.  
  17. **************************************************
  18.  
  19. Output:
  20. Note that it infinitely loops, don't know why. Any ideas?
  21.  
  22. Binary file 29ctkki matches
  23. Binary file 29cu6sX matches
  24. Binary file 29cumbH matches
  25. 29cv1JW: id=W5M0MpCehiHzreSzNTczkc9d
  26. 29cv1JW:adobe:ns:meta/ x:xmptk=Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
  27. 29cv1JW:http://www.w3.org/1999/02/22-rdf-syntax-ns#
  28. 29cv1JW:
  29. 29cv1JW:http://purl.org/dc/elements/1.1/
  30. 29cv1JW:http://ns.adobe.com/xap/1.0/
  31. 29cv1JW:http://ns.adobe.com/pdf/1.3/
  32. 29cv1JW:http://ns.adobe.com/xap/1.0/mm/
  33. 29cv1JW:x-default
  34. 29cv1JW:w
  35. Binary file 29cv1JW matches
  36. Binary file 29cv1JW.1 matches
  37. Binary file 29cv8FE matches
  38. Binary file 29ddbYb matches
  39. Binary file 29ddd2b matches
  40. Binary file 29ddd2b.1 matches
  41. Binary file 29ddKBp matches
  42. Binary file 29ddm60 matches
  43. Binary file 29deg2k matches
  44. Binary file 29deQgz matches
  45. Binary file 29df2fw matches
  46. Binary file 29dfUkt matches
  47. Binary file 29dj7zY matches
  48. Binary file 29djdrk matches
  49. Binary file 29djdrk.1 matches
  50. Binary file 29djvi9 matches
  51. Binary file 29djvi9.1 matches
  52. Binary file 29dk0Ze matches
  53. Binary file 29dkhf4 matches
  54. Binary file 29dkq1V matches
  55. Binary file 29dkZZK matches
  56. Binary file 29dlaE5 matches
  57. Binary file 29dlH9d matches
  58. Binary file 29dlTVV matches
  59. Binary file 29dlTVV.1 matches
  60. Binary file 29dmCXi matches
  61. Binary file 29dmh6L matches
  62. Binary file 29dmTJT matches
  63. Binary file 29fJA2g matches
  64. Binary file 29fJpEc matches
  65. Binary file 29fKMD6 matches
  66. Binary file 29FkNr3 matches
  67. Binary file 29fKWdi matches
  68. Binary file 29fNPxT matches
  69. Binary file 29fOrnd matches
  70. Binary file 29fOrnd.1 matches
  71. Binary file 29fOWdV matches
  72. Binary file 29fPAec matches
  73. Binary file 29fPMug matches
  74. Binary file 29fPnIe matches
  75. Binary file 29fPweO matches
  76. Binary file 29fPweO.1 matches
  77. Binary file 29fQN5c matches
  78. Binary file 29fQN5c.1 matches
  79. Binary file 29fQRlQ matches
  80. Binary file 29FT71n matches
  81. Binary file 29FW41O matches
  82. Binary file 29FZx0B matches
  83. Binary file 29GpFsY matches
  84. Binary file 29gsFOl matches
  85. Binary file 29gsFOl.1 matches
  86. Binary file 29gsnHt matches
  87. Binary file 29gteI8 matches
  88. Binary file 29gvTBJ matches
  89. Binary file 29H2bo1 matches
  90. Binary file 29H7K5O matches
  91. Binary file 29hB9CQ matches
  92. Binary file 29hofVk matches
  93. Binary file 29hofVk.1 matches
  94. Binary file 29hwj8y matches
  95. Binary file 29hxogT matches
  96. Binary file 29hxyEN matches
  97. Binary file 29hzPzU matches
  98. Binary file 29hzPzU.1 matches
  99. Binary file 29i2CEe matches
  100. Binary file 29ialCf matches
  101. Binary file 29ibJVq matches
  102. Binary file 29idcee matches
  103. Binary file 29idEct matches
  104. Binary file 29idnpO matches
  105. Binary file 29ie2rq matches
  106. Binary file 29ieSEI matches
  107. Binary file 29ieXIo matches
  108. Binary file 29jH8bx matches
  109. Binary file 29jJLdx matches
  110. Binary file 29jLjnM matches
  111. Binary file 29jLNtX matches
  112. Binary file 29nc2QS matches
  113. Binary file 29ncgrb matches
  114. Binary file 29ne5V5 matches
  115. Binary file 29nevuE matches
  116. Binary file 29odbJ6 matches
  117. Binary file 29ohqUT matches
  118. Binary file 29ojrAy matches
  119. Binary file 29okalt matches
  120. Binary file 29olaWI matches
  121. Binary file 29oRWlp matches
  122. Binary file 29pbiLY matches
  123. Binary file 29pcQFA matches
  124. Binary file 29pfQ50 matches
  125. Binary file 29pvj5I matches
  126. Binary file 29pwCBO matches
  127. Binary file 29pxarl matches
  128. Binary file 29pz4Im matches
  129. Binary file 29pztuz matches
  130. Binary file 29rLH2H matches
  131. Binary file 29rLlZV matches
  132. Binary file 29rML6Q matches
  133. Binary file 29rON6X matches
  134. Binary file 29rOvx0 matches
  135. Binary file 29rOYz9 matches
  136. Binary file 29v9igV matches
  137. Binary file 29v9igV.1 matches
  138. Binary file 29viFmi matches
  139. Binary file 29w5gr9 matches
  140. Binary file 29w68w8 matches
  141. Binary file 29Xnqk8 matches
  142. Binary file 29xtHDs matches
  143. Binary file 29xtlNa matches
  144. Binary file 29ycEnb matches
  145. Binary file 29zYWzl matches
  146. Binary file N1HEpM matches
  147. Binary file N1HMW7 matches
  148. Binary file N1HQW0 matches
  149. Binary file N1HX3Q matches
  150. Binary file N1I2o4 matches
  151. Binary file N1I935 matches
  152. Binary file N1Ienp matches
  153. Binary file N1J8A8 matches
  154. Binary file N1JfvI matches
  155. Binary file N1JiHO matches
  156. Binary file N1Jo27 matches
  157. Binary file OudHlO matches
  158. Binary file OudJdr matches
  159. Binary file Oue0NG matches
  160. Binary file Oue2oE matches
  161. Binary file Ouebsh matches
  162. Binary file OuecfK matches
  163. Binary file OueFPb matches
  164. Binary file OueIKU matches
  165. Binary file OuelQu matches
  166. Binary file OueoMd matches
  167. Binary file OueUd4 matches
  168. Binary file OueVxy matches
  169. Binary file Ouf6sO matches
  170. Binary file Ouf9og matches
  171. Binary file OufCXN matches
  172. Binary file OufgQN matches
  173. Binary file OufkQs matches
  174. Binary file OufRSs matches
  175. Binary file OufVlq matches
  176. Binary file Oufwzg matches
  177. Binary file Oug5Jl matches
  178. Binary file Oug74a matches
  179. renamethefiles.sh:$i | grep -o '.*' * | sed 's/
  180. renamethefiles.sh:$i $x
  181. Binary file TL3pn1 matches
  182. Binary file TUmyTW matches
  183. Binary file TWa2Dg matches
  184. Binary file ZZezok matches
  185. Binary file ZZh7Ts matches
  186. mv -i 128Ogso Binary file 1002Upx matches
  187. Binary file 1005lbB matches
  188. Binary file 1006fEV matches
  189. Binary file 10ttQ3n matches
  190. Binary file 10tu5eD matches
  191. Binary file 10tuWvL matches
  192. Binary file 11HXnjD matches
  193. Binary file 11IMDlh matches
  194. Binary file 11IQ8bd matches
  195. Binary file 11lkViX matches
  196. Binary file 11VIxdB matches
  197. Binary file 11vx5Cy matches
  198. Binary file 11WvSqL matches
  199. Binary file 1287Jt4 matches
  200. Binary file 128a1ID matches
  201. Binary file 128NAD6 matches
  202. Binary file 128Ogso matches
  203. Binary file 12FIapt matches
  204. Binary file 12FIZ1I matches
  205. Binary file 12FMEMP matches
  206. Binary file 12FN71F matches
  207. Binary file 12FObmf matches
  208. Binary file 12RZWY1 matches
  209. Binary file 12S035G matches
  210. Binary file 13PlvVY matches
  211. Binary file 13Pn1XY matches
  212. Binary file 13Qbl7k matches
  213. Binary file 13QcfRi matches
  214. Binary file 13QdHDb matches
  215. Binary file 13WChkr matches
  216. Binary file 13WvGXa matches
  217. Binary file 13XRfqr matches
  218. Binary file 14fCxLS matches
  219. Binary file 14givRo matches
  220. Binary file 14gkBRc matches
  221. Binary file 14HcD5O matches
  222. Binary file 14HMJ1Q matches
  223. Binary file 14HOjki matches
  224. Binary file 14HOxb2 matches
  225. Binary file 15fRBI9 matches
  226. Binary file 15fXTHQ matches
  227. Binary file 16CaDM1 matches
  228. Binary file 16CkUI4 matches
  229. Binary file 16dFAWc matches
  230. Binary file 16dHXZ9 matches
  231. Binary file 16E4lf4 matches
  232. Binary file 16E6G9L matches
  233. Binary file 17iah0Q matches
  234. Binary file 17iaq4l matches
  235. Binary file 17icbPc matches
  236. Binary file 17jgPfG matches
  237. Binary file 17UHSNJ matches
  238. Binary file 17VqB79 matches
  239. Binary file 18VNatF matches
  240. Binary file 19fCnqV matches
  241. Binary file 19fDuqE matches
  242. Binary file 19LCgpM matches
  243. Binary file 19LEPIz matches
  244. Binary file 19LwMLI matches
  245. Binary file 1anyEJj matches
  246. Binary file 1bPPb6C matches
  247. Binary file 1bPRqqz matches
  248. Binary file 1bRgXzV matches
  249. Binary file 1bRhVMn matches
  250. Binary file 1bRiXbc matches
  251. Binary file 1dG2ZZ9 matches
  252. Binary file 1dGxEW7 matches
  253. Binary file 1dGxnSW matches
  254. Binary file 1dHSpRh matches
  255. Binary file 1ewwcq6 matches
  256. Binary file 1ffeiJo matches
  257. Binary file 1G0DEjb matches
  258. Binary file 1G2ccS5 matches
  259. Binary file 1giniO7 matches
  260. Binary file 1H1Exty matches
  261. Binary file 1H1MFKr matches
  262. Binary file 1H2Bq3J matches
  263. Binary file 1H7bxTv matches
  264. Binary file 1HGqihD matches
  265. Binary file 1IZCarE matches
  266. Binary file 1j5aDhH matches
  267. Binary file 1JHmqiB matches
  268. Binary file 1JPNIAt matches
  269. Binary file 1KEShAt matches
  270. Binary file 1KHqGNK matches
  271. Binary file 1LO5k1Y matches
  272. Binary file 1LRIveQ matches
  273. Binary file 1LSKTC0 matches
  274. Binary file 1LSOsIu matches
  275. Binary file 1M7Xr5v matches
  276. Binary file 1M7Ycve matches
  277. Binary file 1n3mAUZ matches
  278. Binary file 1n3mkVY matches
  279. Binary file 1NKjUqp matches
  280. Binary file 1NLviCk matches
  281. Binary file 1omCrM6 matches
  282. Binary file 1pxniH4 matches
  283. Binary file 1qbEeVc matches
  284. Binary file 1qC1pu4 matches
  285. Binary file 1qC1pu4.1 matches
  286. Binary file 1qZlnOJ matches
  287. Binary file 1qzON6Q matches
  288. Binary file 1rB8nl1 matches
  289. Binary file 1ReR3Qq matches
  290. Binary file 1Rf7BaZ matches
  291. Binary file 1S1f34H matches
  292. Binary file 1S1i4C0 matches
  293. Binary file 1sgMWDe matches
  294. Binary file 1sl39Hs matches
  295. Binary file 1UrQDFx matches
  296. Binary file 1vKOGot matches
  297. Binary file 1vM9H2d matches
  298. Binary file 1vM9mwt matches
  299. Binary file 29aelm3 matches
  300. Binary file 29aewh2 matches
  301. Binary file 29afaLE matches
  302. Binary file 29agkqx matches
  303. Binary file 29agpuw matches
  304. Binary file 29AT60J matches
  305. Binary file 29cqzzq matches
  306. Binary file 29crGiw matches
  307. Binary file 29cs157 matches
  308. Binary file 29cs7Fg matches
  309. Binary file 29csBjh matches
  310. Binary file 29csX4C matches
  311. Binary file 29cthAz matches
  312. Binary file 29ctkki matches
  313. Binary file 29cu6sX matches
  314. Binary file 29cumbH matches
  315. 29cv1JW: id=W5M0MpCehiHzreSzNTczkc9d
  316. 29cv1JW:adobe:ns:meta/ x:xmptk=Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
  317. 29cv1JW:http://www.w3.org/1999/02/22-rdf-syntax-ns#
  318. 29cv1JW:
  319. 29cv1JW:http://purl.org/dc/elements/1.1/
  320. 29cv1JW:http://ns.adobe.com/xap/1.0/
  321. 29cv1JW:http://ns.adobe.com/pdf/1.3/
  322. 29cv1JW:http://ns.adobe.com/xap/1.0/mm/
  323. 29cv1JW:x-default
  324. 29cv1JW:w
  325. Binary file 29cv1JW matches
  326. Binary file 29cv1JW.1 matches
  327. Binary file 29cv8FE matches
  328. Binary file 29ddbYb matches
  329. Binary file 29ddd2b matches
  330. Binary file 29ddd2b.1 matches
  331. Binary file 29ddKBp matches
  332. Binary file 29ddm60 matches
  333. Binary file 29deg2k matches
  334. Binary file 29deQgz matches
  335. Binary file 29df2fw matches
  336. Binary file 29dfUkt matches
  337. Binary file 29dj7zY matches
  338. Binary file 29djdrk matches
  339. Binary file 29djdrk.1 matches
  340. Binary file 29djvi9 matches
  341. Binary file 29djvi9.1 matches
  342. Binary file 29dk0Ze matches
  343. Binary file 29dkhf4 matches
  344. Binary file 29dkq1V matches
  345. Binary file 29dkZZK matches
  346. Binary file 29dlaE5 matches
  347. Binary file 29dlH9d matches
  348. Binary file 29dlTVV matches
  349. Binary file 29dlTVV.1 matches
  350. Binary file 29dmCXi matches
  351. Binary file 29dmh6L matches
  352. Binary file 29dmTJT matches
  353. Binary file 29fJA2g matches
  354. Binary file 29fJpEc matches
  355. Binary file 29fKMD6 matches
  356. Binary file 29FkNr3 matches
  357. Binary file 29fKWdi matches
  358. Binary file 29fNPxT matches
  359. Binary file 29fOrnd matches
  360. Binary file 29fOrnd.1 matches
  361. Binary file 29fOWdV matches
  362. Binary file 29fPAec matches
  363. Binary file 29fPMug matches
  364. Binary file 29fPnIe matches
  365. Binary file 29fPweO matches
  366. Binary file 29fPweO.1 matches
  367. Binary file 29fQN5c matches
  368. Binary file 29fQN5c.1 matches
  369. Binary file 29fQRlQ matches
  370. Binary file 29FT71n matches
  371. Binary file 29FW41O matches
  372. Binary file 29FZx0B matches
  373. Binary file 29GpFsY matches
  374. Binary file 29gsFOl matches
  375. Binary file 29gsFOl.1 matches
  376. Binary file 29gsnHt matches
  377. Binary file 29gteI8 matches
  378. Binary file 29gvTBJ matches
  379. Binary file 29H2bo1 matches
  380. Binary file 29H7K5O matches
  381. Binary file 29hB9CQ matches
  382. Binary file 29hofVk matches
  383. Binary file 29hofVk.1 matches
  384. Binary file 29hwj8y matches
  385. Binary file 29hxogT matches
  386. Binary file 29hxyEN matches
  387. Binary file 29hzPzU matches
  388. Binary file 29hzPzU.1 matches
  389. Binary file 29i2CEe matches
  390. Binary file 29ialCf matches
  391. Binary file 29ibJVq matches
  392. Binary file 29idcee matches
  393. Binary file 29idEct matches
  394. Binary file 29idnpO matches
  395. Binary file 29ie2rq matches
  396. Binary file 29ieSEI matches
  397. Binary file 29ieXIo matches
  398. Binary file 29jH8bx matches
  399. Binary file 29jJLdx matches
  400. Binary file 29jLjnM matches
  401. Binary file 29jLNtX matches
  402. Binary file 29nc2QS matches
  403. Binary file 29ncgrb matches
  404. Binary file 29ne5V5 matches
  405. Binary file 29nevuE matches
  406. Binary file 29odbJ6 matches
  407. Binary file 29ohqUT matches
  408. Binary file 29ojrAy matches
  409. Binary file 29okalt matches
  410. Binary file 29olaWI matches
  411. Binary file 29oRWlp matches
  412. Binary file 29pbiLY matches
  413. Binary file 29pcQFA matches
  414. Binary file 29pfQ50 matches
  415. Binary file 29pvj5I matches
  416. Binary file 29pwCBO matches
  417. Binary file 29pxarl matches
  418. Binary file 29pz4Im matches
  419. Binary file 29pztuz matches
  420. Binary file 29rLH2H matches
  421. Binary file 29rLlZV matches
  422. Binary file 29rML6Q matches
  423. Binary file 29rON6X matches
  424. Binary file 29rOvx0 matches
  425. Binary file 29rOYz9 matches
  426. Binary file 29v9igV matches
  427. Binary file 29v9igV.1 matches
  428. Binary file 29viFmi matches
  429. Binary file 29w5gr9 matches
  430. Binary file 29w68w8 matches
  431. Binary file 29Xnqk8 matches
  432. Binary file 29xtHDs matches
  433. Binary file 29xtlNa matches
  434. Binary file 29ycEnb matches
  435. Binary file 29zYWzl matches
  436. Binary file N1HEpM matches
  437. Binary file N1HMW7 matches
  438. Binary file N1HQW0 matches
  439. Binary file N1HX3Q matches
  440. Binary file N1I2o4 matches
  441. Binary file N1I935 matches
  442. Binary file N1Ienp matches
  443. Binary file N1J8A8 matches
  444. Binary file N1JfvI matches
  445. Binary file N1JiHO matches
  446. Binary file N1Jo27 matches
  447. Binary file OudHlO matches
  448. Binary file OudJdr matches
  449. Binary file Oue0NG matches
  450. Binary file Oue2oE matches
  451. Binary file Ouebsh matches
  452. Binary file OuecfK matches
  453. Binary file OueFPb matches
  454. Binary file OueIKU matches
  455. Binary file OuelQu matches
  456. Binary file OueoMd matches
  457. Binary file OueUd4 matches
  458. Binary file OueVxy matches
  459. Binary file Ouf6sO matches
  460. Binary file Ouf9og matches
  461. Binary file OufCXN matches
  462. Binary file OufgQN matches
  463. Binary file OufkQs matches
  464. Binary file OufRSs matches
  465. Binary file OufVlq matches
  466. Binary file Oufwzg matches
  467. Binary file Oug5Jl matches
  468. Binary file Oug74a matches
  469. renamethefiles.sh:$i | grep -o '.*' * | sed 's/
  470. renamethefiles.sh:$i $x
  471. Binary file TL3pn1 matches
  472. Binary file TUmyTW matches
  473. Binary file TWa2Dg matches
  474. Binary file ZZezok matches
  475. Binary file ZZh7Ts matches
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement