640 [9].png

id: a7ac3624321348d0b1dfc2cb9e2545c2
mime: image/png
filename: 
created_time: 2025-11-28T16:55:40.317Z
updated_time: 2025-11-30T13:13:38.891Z
user_created_time: 2025-11-28T16:55:40.317Z
user_updated_time: 2025-11-30T13:13:38.891Z
file_extension: png
encryption_cipher_text: 
encryption_applied: 0
encryption_blob_encrypted: 0
size: 267411
is_shared: 0
share_id: 
master_key_id: 
user_data: 
blob_updated_time: 1764348940317
ocr_text: Name 1_bash_rename_files_in_folder\nGoal Write a prompt to write code in Bash to rename files in a folder.\nModel gemini-pro\nTemperature 01 Token Limit 1024\nTop-K N/A Top-P 1\nPrompt Write a code snippet in Bash, which asks for a folder name.\nThen it takes the contents of the folder and renames all the\nfiles inside by prepending the name draft to the file name.\n#!/bin/bash\n# Ask for the folder name\necho "Enter the folder name: "\nread folder_name\n# Check if the folder exists\nif [ ! -d "$folder_name" ]; then\necho "Folder does not exist."\nexit 1\nfi\n# Get the list of files in the folder\nfiles=( "$folder_name"/* )\n# Rename each file by prepending "draft" to the file name\nfor file in "${files[@]}"; do\nnew_file_name="draft_$(basename "$file")"\nmv "$file" "Snew_file_name"\ndone\necho "Files renamed successfully."
ocr_details: [{"words":[{"t":"Name","bb":[24,84,25,43],"bl":[24,84,43,43]},{"t":"1_bash_rename_files_in_folder","bb":[210,522,24,47],"bl":[210,522,43,42]}]},{"words":[{"t":"Goal","bb":[23,71,62,93],"bl":[23,71,84,84]},{"t":"Write","bb":[210,264,66,84],"bl":[210,264,84,84]},{"t":"a","bb":[271,282,71,84],"bl":[271,282,84,84]},{"t":"prompt","bb":[291,365,68,89],"bl":[291,365,84,84]},{"t":"to","bb":[372,392,68,84],"bl":[372,392,84,84]},{"t":"write","bb":[399,450,66,84],"bl":[399,450,84,84]},{"t":"code","bb":[457,509,66,84],"bl":[457,509,84,84]},{"t":"in","bb":[516,531,66,84],"bl":[516,531,84,84]},{"t":"Bash","bb":[540,589,66,84],"bl":[540,589,84,84]},{"t":"to","bb":[597,617,68,84],"bl":[597,617,84,84]},{"t":"rename","bb":[625,702,71,84],"bl":[625,702,84,84]},{"t":"files","bb":[709,751,65,84],"bl":[709,751,84,84]},{"t":"in","bb":[759,774,66,84],"bl":[759,774,84,84]},{"t":"a","bb":[783,793,71,84],"bl":[783,793,84,84]},{"t":"folder.","bb":[801,866,65,84],"bl":[801,866,84,84]}]},{"words":[{"t":"Model","bb":[24,88,102,134],"bl":[24,88,125,125]},{"t":"gemini-pro","bb":[210,324,107,130],"bl":[210,324,125,125]}]},{"words":[{"t":"Temperature","bb":[22,160,144,175],"bl":[22,160,166,166]},{"t":"01","bb":[211,236,149,166],"bl":[211,236,166,166]},{"t":"Token","bb":[501,564,148,166],"bl":[501,564,166,166]},{"t":"Limit","bb":[572,623,148,166],"bl":[572,623,166,166]},{"t":"1024","bb":[812,859,149,166],"bl":[812,859,166,166]}]},{"words":[{"t":"Top-K","bb":[22,87,191,213],"bl":[22,87,208,208]},{"t":"N/A","bb":[211,247,191,208],"bl":[211,247,208,208]},{"t":"Top-P","bb":[501,565,191,213],"bl":[501,565,208,208]},{"t":"1","bb":[812,818,191,208],"bl":[812,818,208,208]}]},{"words":[{"t":"Prompt","bb":[24,101,232,254],"bl":[24,101,249,249]},{"t":"Write","bb":[210,273,234,251],"bl":[210,273,251,251]},{"t":"a","bb":[290,301,238,251],"bl":[290,301,251,251]},{"t":"code","bb":[317,370,234,251],"bl":[317,370,251,251]},{"t":"snippet","bb":[387,478,234,256],"bl":[387,478,251,251]},{"t":"in","bb":[496,519,234,251],"bl":[496,519,251,251]},{"t":"Bash,","bb":[536,596,233,255],"bl":[536,596,251,251]},{"t":"which","bb":[615,682,233,251],"bl":[615,682,251,251]},{"t":"asks","bb":[699,750,233,251],"bl":[699,750,251,251]},{"t":"for","bb":[766,803,233,251],"bl":[766,803,251,251]},{"t":"a","bb":[820,830,238,251],"bl":[820,830,251,251]},{"t":"folder","bb":[847,924,233,251],"bl":[847,924,251,251]},{"t":"name.","bb":[941,1002,238,251],"bl":[941,1002,251,251]}]},{"words":[{"t":"Then","bb":[210,263,266,283],"bl":[210,263,283,283]},{"t":"it","bb":[280,302,266,283],"bl":[280,302,283,283]},{"t":"takes","bb":[319,384,266,283],"bl":[319,384,283,283]},{"t":"the","bb":[400,439,266,283],"bl":[400,439,283,283]},{"t":"contents","bb":[455,560,268,283],"bl":[455,560,283,283]},{"t":"of","bb":[577,601,265,283],"bl":[577,601,283,283]},{"t":"the","bb":[617,655,266,283],"bl":[617,655,283,283]},{"t":"folder","bb":[672,749,265,283],"bl":[672,749,283,283]},{"t":"and","bb":[766,804,266,283],"bl":[766,804,283,283]},{"t":"renames","bb":[822,914,270,283],"bl":[822,914,283,283]},{"t":"all","bb":[931,969,266,283],"bl":[931,969,283,283]},{"t":"the","bb":[985,1023,266,283],"bl":[985,1023,283,283]}]},{"words":[{"t":"files","bb":[211,275,297,315],"bl":[211,275,315,315]},{"t":"inside","bb":[292,370,297,315],"bl":[292,370,315,315]},{"t":"by","bb":[387,412,297,319],"bl":[387,412,315,315]},{"t":"prepending","bb":[428,560,297,319],"bl":[428,560,315,315]},{"t":"the","bb":[577,615,297,315],"bl":[577,615,315,315]},{"t":"name","bb":[632,685,302,315],"bl":[632,685,315,315]},{"t":"draft","bb":[701,765,297,315],"bl":[701,765,315,315]},{"t":"to","bb":[782,806,299,315],"bl":[782,806,315,315]},{"t":"the","bb":[822,860,297,315],"bl":[822,860,315,315]},{"t":"file","bb":[877,928,297,315],"bl":[877,928,315,315]},{"t":"name.","bb":[945,1006,302,315],"bl":[945,1006,315,315]}]},{"words":[{"t":"#!/bin/bash","bb":[210,351,410,429],"bl":[210,351,428,428]}]},{"words":[{"t":"#","bb":[210,223,456,473],"bl":[210,223,473,473]},{"t":"Ask","bb":[238,277,455,473],"bl":[238,277,473,473]},{"t":"for","bb":[293,330,455,473],"bl":[293,330,473,473]},{"t":"the","bb":[347,385,455,473],"bl":[347,385,473,473]},{"t":"folder","bb":[401,478,455,473],"bl":[401,478,473,473]},{"t":"name","bb":[495,548,460,473],"bl":[495,548,473,473]}]},{"words":[{"t":"echo","bb":[211,263,486,504],"bl":[211,263,504,504]},{"t":"\"Enter","bb":[282,356,487,504],"bl":[282,356,504,504]},{"t":"the","bb":[373,411,486,504],"bl":[373,411,504,504]},{"t":"folder","bb":[427,504,486,504],"bl":[427,504,504,504]},{"t":"name:","bb":[521,582,491,504],"bl":[521,582,504,504]},{"t":"\"","bb":[604,610,487,492],"bl":[604,610,504,504]}]},{"words":[{"t":"read","bb":[213,262,519,536],"bl":[213,262,536,536]},{"t":"folder_name","bb":[279,423,518,538],"bl":[279,423,536,536]}]},{"words":[{"t":"#","bb":[210,223,564,581],"bl":[210,223,581,581]},{"t":"Check","bb":[238,304,563,581],"bl":[238,304,581,581]},{"t":"if","bb":[321,345,563,581],"bl":[321,345,581,581]},{"t":"the","bb":[360,398,563,581],"bl":[360,398,581,581]},{"t":"folder","bb":[415,492,563,581],"bl":[415,492,581,581]},{"t":"exists","bb":[509,586,564,581],"bl":[509,586,581,581]}]},{"words":[{"t":"if","bb":[211,234,595,613],"bl":[211,234,613,613]},{"t":"[","bb":[253,258,594,617],"bl":[253,258,613,613]},{"t":"!","bb":[282,284,596,613],"bl":[282,284,613,613]},{"t":"-d","bb":[306,329,596,613],"bl":[306,329,613,614]},{"t":"\"$folder_name\"","bb":[348,525,594,615],"bl":[348,525,614,613]},{"t":"];","bb":[547,562,594,617],"bl":[547,562,613,613]},{"t":"then","bb":[581,634,596,613],"bl":[581,634,613,613]}]},{"words":[{"t":"echo","bb":[211,263,628,645],"bl":[211,263,645,645]},{"t":"\"Folder","bb":[282,369,628,645],"bl":[282,369,645,645]},{"t":"does","bb":[386,438,628,645],"bl":[386,438,645,645]},{"t":"not","bb":[455,492,630,645],"bl":[455,492,645,645]},{"t":"exist.\"","bb":[509,593,628,645],"bl":[509,593,645,645]}]},{"words":[{"t":"exit","bb":[211,261,660,677],"bl":[211,261,677,677]},{"t":"1","bb":[278,285,660,677],"bl":[278,285,677,677]}]},{"words":[{"t":"fi","bb":[211,235,691,709],"bl":[211,235,709,709]}]},{"words":[{"t":"#","bb":[210,223,737,754],"bl":[210,223,754,754]},{"t":"Get","bb":[238,276,737,754],"bl":[238,276,754,754]},{"t":"the","bb":[293,332,736,754],"bl":[293,332,754,754]},{"t":"list","bb":[348,399,736,754],"bl":[348,399,754,754]},{"t":"of","bb":[415,440,736,754],"bl":[415,440,754,754]},{"t":"files","bb":[456,520,736,754],"bl":[456,520,754,754]},{"t":"in","bb":[537,561,737,754],"bl":[537,561,754,754]},{"t":"the","bb":[578,616,736,754],"bl":[578,616,754,754]},{"t":"folder","bb":[633,709,736,754],"bl":[633,709,754,754]}]},{"words":[{"t":"files=(","bb":[211,299,767,791],"bl":[211,299,786,787]},{"t":"\"$folder_name\"/*","bb":[320,522,767,788],"bl":[320,522,787,786]},{"t":")","bb":[540,546,767,791],"bl":[540,546,786,786]}]},{"words":[{"t":"#","bb":[210,223,814,831],"bl":[210,223,831,831]},{"t":"Rename","bb":[239,319,814,831],"bl":[239,319,831,831]},{"t":"each","bb":[335,387,813,831],"bl":[335,387,831,831]},{"t":"file","bb":[404,455,813,831],"bl":[404,455,831,831]},{"t":"by","bb":[471,496,813,835],"bl":[471,496,831,831]},{"t":"prepending","bb":[512,644,813,835],"bl":[512,644,831,831]},{"t":"\"draft\"","bb":[664,747,813,831],"bl":[664,747,831,831]},{"t":"to","bb":[766,790,815,831],"bl":[766,790,831,831]},{"t":"the","bb":[806,845,813,831],"bl":[806,845,831,831]},{"t":"file","bb":[861,912,813,831],"bl":[861,912,831,831]},{"t":"name","bb":[928,982,818,831],"bl":[928,982,831,831]}]},{"words":[{"t":"for","bb":[211,248,844,862],"bl":[211,248,862,862]},{"t":"file","bb":[264,315,844,862],"bl":[264,315,862,862]},{"t":"in","bb":[333,356,845,862],"bl":[333,356,862,862]},{"t":"\"${files[@]}\";","bb":[375,537,843,866],"bl":[375,537,863,862]},{"t":"do","bb":[557,582,845,862],"bl":[557,582,862,862]}]},{"words":[{"t":"new_file_name=\"draft_$(basename","bb":[211,623,875,899],"bl":[211,623,894,894]},{"t":"\"$file\")\"","bb":[642,749,875,899],"bl":[642,749,895,894]}]},{"words":[{"t":"mv","bb":[210,236,914,926],"bl":[210,236,926,926]},{"t":"\"$file\"","bb":[255,338,907,929],"bl":[255,338,926,926]},{"t":"\"Snew_file_name\"","bb":[360,567,907,929],"bl":[360,567,926,926]}]},{"words":[{"t":"done","bb":[211,264,941,959],"bl":[211,264,959,959]}]},{"words":[{"t":"echo","bb":[211,263,986,1003],"bl":[211,263,1003,1003]},{"t":"\"Files","bb":[282,355,986,1003],"bl":[282,355,1003,1003]},{"t":"renamed","bb":[374,466,986,1003],"bl":[374,466,1003,1003]},{"t":"successfully.\"","bb":[483,658,985,1008],"bl":[483,658,1003,1003]}]}]
ocr_status: 2
ocr_error: 
ocr_driver_id: 1
type_: 4