Tzafrir Cohen wrote:
> On Sun, Dec 21, 2008 at 04:45:21PM -0600, Ron Johnson wrote:
>> On 12/21/08 15:58, Jörg-Volker Peetz wrote:
>>> $ seq -w 1 1 10 | xargs -i -n1 cp file.jpg file{}.jpg
>> What's with the {}? An implied variable?
>
> $ LANG=C man xargs | grep -C 2 '{}'
>-i[replace-str]
2008/12/14, Rodolfo Medina :
> I need the right syntax to copy file.jpg 100 times with one command so to
> get
> 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>
> Can anybody suggest how to achieve that?
You could try something like:
cat file.pdf | tee `seq -w 0 100 | sed 's+.*+file_&.p
On Sun, Dec 21, 2008 at 04:45:21PM -0600, Ron Johnson wrote:
> On 12/21/08 15:58, Jörg-Volker Peetz wrote:
>> $ seq -w 1 1 10 | xargs -i -n1 cp file.jpg file{}.jpg
>
> What's with the {}? An implied variable?
$ LANG=C man xargs | grep -C 2 '{}'
-i[replace-str]
This option i
On 12/21/08 15:58, Jörg-Volker Peetz wrote:
Osamu Aoki wrote:
On Sat, Dec 13, 2008 at 09:13:07PM +, Tzafrir Cohen wrote:
On Sun, Dec 14, 2008 at 03:50:31AM +0900, Osamu Aoki wrote:
On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
I need the right syntax to copy file.jpg 100
Osamu Aoki wrote:
> On Sat, Dec 13, 2008 at 09:13:07PM +, Tzafrir Cohen wrote:
>> On Sun, Dec 14, 2008 at 03:50:31AM +0900, Osamu Aoki wrote:
>>> On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
I need the right syntax to copy file.jpg 100 times with one command so to
Thomas Preud'homme wrote:
> filevar=$1 # The file to copy a hundred time
> basefile=${filevar%.[^.]*} # We delete all the end from the last dot (eg
> a dot followed by any others caracters)
> extension=${filevar##^.*.} # We delete all the beginning until the last
Just for refere
Thomas Preud'homme wrote:
> The Saturday 13 December 2008 20:12:32 Rodolfo Medina, you wrote :
>> I need the right syntax to copy file.jpg 100 times with one command so to
>> get 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>>
>> Can anybody suggest how to achieve that?
>>
>> Thanks for
Rick Pasotto wrote:
>
> I forgot about seq. This is even better (the -w left pads with zero for
> equal width):
>
> for x in $(seq -w 1 100); do cp file.jpg file${x}.jpg; done
>
correction^
Nice! Something I have been looking for quite some time. I was u
On Sat, Dec 13, 2008 at 09:13:07PM +, Tzafrir Cohen wrote:
> On Sun, Dec 14, 2008 at 03:50:31AM +0900, Osamu Aoki wrote:
> > On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
> > > I need the right syntax to copy file.jpg 100 times with one command so to
> > > get
> > > 100 files
Hi Rick,
On Sat, Dec 13, 2008 at 7:41 PM, Rick Pasotto wrote:
> I forgot about seq. This is even better (the -w left pads with zero for
> equal width):
>
> for x in $(seq -w 1 100); do cp file.jpg file${c}.jpg; done
Waw! Great one-liner.
BTW: Guess you meant file${x}.jpg;
Greetings, Manon.
On Sat, Dec 13, 2008 at 09:13:07PM +, Tzafrir Cohen wrote:
> On Sun, Dec 14, 2008 at 03:50:31AM +0900, Osamu Aoki wrote:
> > On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
> > > I need the right syntax to copy file.jpg 100 times with one command so to
> > > get
> > > 100 files
On Sun, Dec 14, 2008 at 03:50:31AM +0900, Osamu Aoki wrote:
> On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
> > I need the right syntax to copy file.jpg 100 times with one command so to
> > get
> > 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
> >
> > Can anybody sugge
The Saturday 13 December 2008 20:12:32 Rodolfo Medina, you wrote :
> I need the right syntax to copy file.jpg 100 times with one command so to
> get 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>
> Can anybody suggest how to achieve that?
>
> Thanks for any reply
> Rodolfo
filevar="fil
On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
> I need the right syntax to copy file.jpg 100 times with one command so to get
> 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>
> Can anybody suggest how to achieve that?
ere is one without looping :-)
$ seq 1 100 | sed
Rodolfo writes:
> I need the right syntax to copy file.jpg 100 times with one command so to
> get 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
for I in {1..100}; do cp file.jpg file$I.jpg ; done
But what are you actually trying to achieve?
--
John Hasler
--
To UNSUBSCRIBE, email to
On Sat, Dec 13, 2008 at 07:35:44PM +0100, Manon Metten wrote:
> Hi Rodolfo
>
> On Sat, Dec 13, 2008 at 8:12 PM, Rodolfo Medina
> wrote:
>
> > I need the right syntax to copy file.jpg 100 times with one command so to
> > get
> > 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>
>
> #!/
Hi Rodolfo
On Sat, Dec 13, 2008 at 8:12 PM, Rodolfo Medina
wrote:
> I need the right syntax to copy file.jpg 100 times with one command so to get
> 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
#!/bin/bash
for x in `seq 1 100`; do
if [[ x -lt 10 ]]; then cp file.jpg file-00$x.
On Sat, Dec 13, 2008 at 07:12:32PM +, Rodolfo Medina wrote:
> I need the right syntax to copy file.jpg 100 times with one command so to get
> 100 files named file1.jpg, file2.jpg, ..., file100.jpg.
>
> Can anybody suggest how to achieve that?
c=0; while [ $c -lt 100 ]; do c=$[c + 1]; n='000'$
I need the right syntax to copy file.jpg 100 times with one command so to get
100 files named file1.jpg, file2.jpg, ..., file100.jpg.
Can anybody suggest how to achieve that?
Thanks for any reply
Rodolfo
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsub
19 matches
Mail list logo