Re: Stupid shell question

2012-02-15 Thread Chrissy Jackson
On 12/02/12 23:55, Joel Roth wrote: Hi Shellsters, I've got a directory structure like this: ./project1/bak/a.yml ./project1/bak/b.yml ./project2/bak/c.yml ./project2/bak/d.yml I want to move the *.yml files into the corresponding parent directory. I tried this: for dir in `find -maxdepth

Re: Stupid shell question

2012-02-13 Thread Joel Roth
On Mon, Feb 13, 2012 at 09:50:08AM +, Chris Davies wrote: > Joel Roth wrote: > > ./project1/bak/a.yml > > ./project1/bak/b.yml > > ./project2/bak/c.yml > > ./project2/bak/d.yml > > > I want to move the *.yml files into the corresponding parent directory. > > rename 's!(.*/)([^/]*)$!$1../$2!'

Re: Stupid shell question

2012-02-13 Thread Chris Davies
Joel Roth wrote: > ./project1/bak/a.yml > ./project1/bak/b.yml > ./project2/bak/c.yml > ./project2/bak/d.yml > I want to move the *.yml files into the corresponding parent directory. rename 's!(.*/)([^/]*)$!$1../$2!' project*/bak/*.yml ;-) Chris -- To UNSUBSCRIBE, email to debian-user-requ..

Re: Stupid shell question

2012-02-13 Thread Joel Roth
On Mon, Feb 13, 2012 at 10:12:14AM +0200, Andrei Popescu wrote: > On Du, 12 feb 12, 20:01:05, Joel Roth wrote: > > > > > > for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml > > > ../..; done > > > > Thanks, I got something like that to work. > > I would have tried something w

Re: Stupid shell question

2012-02-13 Thread Andrei Popescu
On Du, 12 feb 12, 20:01:05, Joel Roth wrote: > > > > for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml ../..; > > done > > Thanks, I got something like that to work. I would have tried something with find's '-execdir' - no need to operate on find's output (not a good idea un

Re: Stupid shell question

2012-02-12 Thread Joel Roth
On Mon, Feb 13, 2012 at 01:44:21AM +, ACro wrote: > > > for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml .. ; > > chdir > > ../..; done > > > Joel, > > try this, HTH: > > for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml ../..; > done Thanks, I got s

Re: Stupid shell question

2012-02-12 Thread ACro
> for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml .. ; chdir > ../..; done Joel, try this, HTH: for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml ../..; done Kind regards, Andrew -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a

Stupid shell question

2012-02-12 Thread Joel Roth
Hi Shellsters, I've got a directory structure like this: ./project1/bak/a.yml ./project1/bak/b.yml ./project2/bak/c.yml ./project2/bak/d.yml I want to move the *.yml files into the corresponding parent directory. I tried this: for dir in `find -maxdepth 1 -type d`; do chdir $dir/bak; mv *.yml

Re: debian shell question

2006-02-28 Thread Hugo Vanwoerkom
igor wrote: looked here? http://www.ductape.net/~mitja/freeunix.shtml http://www.omena.org/ Great stuff. First time I *ever* heard about something like this. H -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: debian shell question

2006-02-28 Thread igor
looked here? http://www.ductape.net/~mitja/freeunix.shtml http://www.omena.org/ -- igor <[EMAIL PROTECTED]> pletisan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

debian shell question

2006-02-28 Thread Deboo ^
Is there a Debian Linux based cheap (like the freeshell ones), one -time payment shell provider? If someone knows of any, please reply. I couldn't find in google. Regards, Deboo -- Please don't Cc: me, I'm subscribed to the list.

Re: Shell Question..

2003-07-21 Thread Mike Dresser
On Mon, 21 Jul 2003, Jeff Schaller wrote: > Boy, reminds me of the old "useless use of cat" award... I always > use: I've got a bunch of those on the shelf here, anyone need one? Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTE

Re: Shell Question..

2003-07-21 Thread Nicolas
try "sed -n 'x p; x q' filename " That will print only line x On Monday 21 July 2003 14:54, Rus Foster wrote: > Hi All, > No strictly on topic but can anyone think of a better way to print out > line x of a file in Shell Script. Best I have so far is (in pseudo code) > > cat /tmp/file | head -$x |

Re: Shell Question..

2003-07-21 Thread Mark Ferlatte
Rus Foster said on Mon, Jul 21, 2003 at 11:54:21AM -0700: > Hi All, > No strictly on topic but can anyone think of a better way to print out > line x of a file in Shell Script. Best I have so far is (in pseudo code) > > cat /tmp/file | head -$x | tail -$x+1 > > Anything better or a perl one liner

Re: Shell Question..

2003-07-21 Thread Jeff Schaller
On Mon, 21 Jul 2003, Rus Foster wrote: > No strictly on topic but can anyone think of a better way to > print out line x of a file in Shell Script. Best I have so far > is (in pseudo code) > > cat /tmp/file | head -$x | tail -$x+1 > > Anything better or a perl one liner? Boy, reminds me of the ol

Shell Question..

2003-07-21 Thread Rus Foster
Hi All, No strictly on topic but can anyone think of a better way to print out line x of a file in Shell Script. Best I have so far is (in pseudo code) cat /tmp/file | head -$x | tail -$x+1 Anything better or a perl one liner? Cheers Rus -- www: http://jvds.com | Virtual Servers from just $1

Re: simple shell question

2001-03-05 Thread MaD dUCK
also sprach Sven Burgener (on Mon, 05 Mar 2001 06:34:44PM +0100): > Can one determine *when* a file was moved into a specific directory? I > guess not, as that means making a change to the directory in question > and not the file. if you are only interested in one-level depth, then an addition/cha

simple shell question

2001-03-05 Thread Sven Burgener
Hello Can one determine *when* a file was moved into a specific directory? I guess not, as that means making a change to the directory in question and not the file. Cheers Sven PS: Please *DO* CC: me. Thank you.

Re: remote shell question

2000-07-11 Thread Massimo Dal Zotto
> Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then close down the workstation from which I SSHed, and come back the n

Re: remote shell question

2000-07-11 Thread Moritz Schulte
On Mon, Jul 10, 2000 at 10:14:37PM -0400, Chris Mason wrote: > Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then clos

Re: remote shell question

2000-07-11 Thread kmself
On Mon, Jul 10, 2000 at 10:14:37PM -0400, Chris Mason wrote: > Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then close

Re: remote shell question

2000-07-10 Thread John Galt
nohup it... On Mon, 10 Jul 2000, Chris Mason wrote: > Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then close down

Re: remote shell question

2000-07-10 Thread John Hasler
Chris Mason wrote: > Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then close down the workstation from which I SSHed,

Re: remote shell question

2000-07-10 Thread Mike Werner
Chris Mason wrote: > Is there any way to SSH or telnet into an account, start a command line > program such as an ftp session, get the download going, then log out and > leave the process happeneing. I would like to be able to start downloading > then close down the workstation from which I SSHed,

remote shell question

2000-07-10 Thread Chris Mason
Is there any way to SSH or telnet into an account, start a command line program such as an ftp session, get the download going, then log out and leave the process happeneing. I would like to be able to start downloading then close down the workstation from which I SSHed, and come back the next day