You are not logged in.
Pages: 1
Hello All :-)
i m here with a new problem.
i have a digital cam[sony] it can strore upto 1500 pics. i want to copy them on machine not all. i copy a range of files[pics] that is between 1250 t0 1425 [these are the name in the digital cam like sac1250.jpg to sac1425.jpg]. i dont know how to copy a particaular range at once.
i have two option
1.) first cp *.* but is time and storage conusming process.
2.) second cp <filename>,<filename1>,<filename-n>
what to do next?.
Thanks:)
Minds are like parachutes. They only function when they are open.
Offline
Probably need to use regular expressions in a shell script. Sorry I can't help with either of those.
Offline
Dear I dont know anything about it.
Minds are like parachutes. They only function when they are open.
Offline
Small script:
for NUM in `seq 1250 1425` ; do
cp sac$NUM.jpg /path/to/destination
done
I don't know any a way to do it with Bash globbing.
Last edited by fukawi2 (2009-06-13 03:12:52)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Hello arunix, As linux offers many DE in my case with GNOME, using gpicview / mirage I could transfer all the photos from sony DSC P72 without any problem. As others said to get only the selected range use bash script or wiith the graphical interface you can do it easily.
Offline
Thanks Dear For Reply me :-)
Now i am searching for shell-script.
Minds are like parachutes. They only function when they are open.
Offline
Now i am searching for shell-script.
The script I posted above will do what you want...
Last edited by fukawi2 (2009-06-13 08:32:06)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks dera what i will start shell-scriot for furthure use ......
and many more work.......
Minds are like parachutes. They only function when they are open.
Offline
bash can do number ranges with {i..n}, ex:
$ echo sac{1250..1255}.jpg
sac1250.jpg sac1251.jpg sac1252.jpg sac1253.jpg sac1254.jpg sac1255.jpg
Offline
The script I posted above will do what you want...
Did someone say something? I thought I heard something... and what's that awful smell? Did someone let a monkey in here?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
bash can do number ranges with {i..n}, ex:
$ echo sac{1250..1255}.jpg sac1250.jpg sac1251.jpg sac1252.jpg sac1253.jpg sac1254.jpg sac1255.jpg
Sweet! Bash can do it... It seemed like such a simple thing that it should be able to do it, but I've never been able to find that. Thanks peets
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Pages: 1