The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
The trouble about SU ... nulnul7 UNIX for Dummies Questions & Answers 4 10-05-2005 11:39 AM
Copying Folders without some folders... ;-) chimpu UNIX for Dummies Questions & Answers 5 04-26-2004 12:25 PM
Backing up Folders without some folders...;) chimpu Shell Programming and Scripting 1 04-26-2004 10:02 AM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 10:48 AM
NIS trouble farzolito UNIX for Advanced & Expert Users 10 12-10-2001 04:44 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-28-2008
ccox85 ccox85 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 27
Trouble with printing to other folders w/ awk

Again, I am in need of some advice.

Earlier I was shown how to have awk create folders for me. That was so cool and helpful, but now I am exploring the posibilities of combining operations with bash scripts.

Now, I am creating the directories with the bash script, and then I want awk to print to those directories. My first error is that I dont know how to open up communication between the shell proper and awk, which is annoying, but also I wanted the shell to date the directories, which was easy enough but I cant figure out how to have awk match those file names, seeing as the date is going to change... daily.


I am wondering, is there a way to use a regular expression in the output path, so it will always identify the first part of the directory name and the reg expression will identify the date?

Or, is there a way to work the date straight into the file path so that it updates with the system time as well. I am using:

Code:
date +%F
in the shell script, so my folder name is:

Code:
mkdir "iat_data_`date +%F`"
and I want awk to print files into that directory.

Thanks!
 

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:26 AM.


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