Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Unix help!

Thread Tools
 
Search this Thread
 
Old 03 May 2012, 03:29 PM
  #1  
Geezer
Scooby Senior
Thread Starter
 
Geezer's Avatar
 
Join Date: Dec 2000
Location: North Wales
Posts: 5,826
Likes: 0
Received 0 Likes on 0 Posts
Cool Unix help!

Right,
I have a .zip file on an AIX box, and if I unzip it using unzip, it's unzips the contents (as you'd expect).

However, I only want one of the files in there to be unzipped, and I want to change the name of it when is unzipped, all in one go, as there may be several of these zip files in the directory, all containing an "out.log" and there will be a need to unzip more than one file per day.

The files are job logs from TWS, on a zCentric agent, so the old STDLIST sturcture has gone from the old styl FTAs (for thos Unix bods who have across TWS.......)

Any ideas?

Geezer
Old 03 May 2012, 03:58 PM
  #2  
IWatkins
Scooby Regular
 
IWatkins's Avatar
 
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes on 0 Posts
Default

Mental blank on piping but how about:

unzip -p YourZipFile out.log > mynewfilename.log

If the out.log is in a subfolder of the zip, you need to full relative path to it from the root of the ZIP. E.g. if in the zip is it located at /logs/out.log the command would be:

unzip -p YourZipFile logs/out.log > mynewfilename.log

It has been 100 years since I did any Unix.

Sorry

Cheers

Ian

Last edited by IWatkins; 03 May 2012 at 04:07 PM. Reason: Brainwave
Old 04 May 2012, 08:03 AM
  #3  
Geezer
Scooby Senior
Thread Starter
 
Geezer's Avatar
 
Join Date: Dec 2000
Location: North Wales
Posts: 5,826
Likes: 0
Received 0 Likes on 0 Posts
Cool

Ian,
It may be a 100 years, but you've still got it! I frickin love you, man!

Geezer
Old 04 May 2012, 04:45 PM
  #4  
IWatkins
Scooby Regular
 
IWatkins's Avatar
 
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes on 0 Posts
Default

Bless
Old 04 May 2012, 11:34 PM
  #5  
Shaun
Scooby Regular
Support Scoobynet!
 
Shaun's Avatar
 
Join Date: Mar 2000
Location: 5 beats 4 - RS3 Rulez!!!
Posts: 8,617
Received 22 Likes on 18 Posts
Default

Originally Posted by IWatkins
Bless
**** me.... you still alive??!!
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
dogmaul
Computer & Technology Related
17
03 May 2003 12:46 PM
Dracoro
Computer & Technology Related
7
07 April 2003 10:58 AM
Dracoro
Computer & Technology Related
9
25 February 2003 03:08 PM
SD
Computer & Technology Related
5
24 April 2002 10:29 AM



Quick Reply: Unix help!



All times are GMT +1. The time now is 03:12 PM.