The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Text Files chapmana UNIX for Dummies Questions & Answers 3 11-22-2006 09:57 AM
Text files DJM UNIX for Dummies Questions & Answers 1 08-18-2006 01:49 PM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 05:25 PM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 03:50 PM
two text files ajnabi Shell Programming and Scripting 1 06-06-2002 12:25 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-04-2007
ShawnMilo ShawnMilo is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 252
Treating bzip2 files as text files

To save space on our development box, I'd like to manipulate tab-delimited files (many of which are huge) in bzip2 format. For simple things, these commands work:

bunzip2 -c file.tab.bz2 | command | command
bzcat file.tab.bz2 | command | command

However, we do most of our work in Makefiles. So quite often I'll need something like this:

outputFile.tab : file1.tab file2.tab
someCommand $^ > $@

Since "someCommand" expects tab-delimited files, and doesn't accept piped input, it seems that I would need a way to either have a "make" variable which is a link to a shell command or a way to make something similar to a symbolic link in bash which allows me to make a shell variable into an alias for a command (bzcat file.tab.bz2).

Is there any way to do this? Here's what I'd like it to look/work like:

outputFile.tab.bz2 : file1.tab.bz2 file2.tab.bz2
someCommand $^ > $@

Or even:

outputFile.tab.bz2 : file1.tab.bz2
someCommand < $< > $@

Thanks in advance,
Shawn
  #2 (permalink)  
Old 06-15-2007
ShawnMilo ShawnMilo is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 252
Is there no way to do this?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0