The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Makefile help tantric High Level Programming 4 04-13-2007 02:35 AM
Makefile NamrataGurav High Level Programming 7 10-07-2006 03:29 PM
about the makefile ligerdave High Level Programming 2 01-31-2006 01:21 AM
makefile help pieter023 Shell Programming and Scripting 1 06-06-2005 02:20 AM
makefile ECBROWN UNIX for Dummies Questions & Answers 4 02-17-2005 12:01 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 12-14-2005
wvdeijk wvdeijk is offline
Registered User
  
 

Join Date: Feb 2005
Location: Ontario
Posts: 25
Using cut within makefile

Using the piece of code below within a makefile, I am getting nothing in variable YR. If I try the code at the command prompt it works fine. Please let me know what I'm doing wrong, or how I can achieve what I want. Thank you.


Code:
DBDATE=2005-09-30

test:
       YR=`echo ${DBDATE}|cut -c1-4` ; echo ${YR}

  #2 (permalink)  
Old 12-14-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
When you type at a command prompt you are talking to a shell which understands all of that shell syntax. A makefile is run by the make program which does not understand shell syntax. I do not know of a way for a make rule to run commands and set a make macro to the result.
  #3 (permalink)  
Old 12-14-2005
wvdeijk wvdeijk is offline
Registered User
  
 

Join Date: Feb 2005
Location: Ontario
Posts: 25
I was afraid of that. Thanks, anyway.
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 06:06 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