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
why the date format dont work in crontab p4cldba UNIX for Advanced & Expert Users 7 06-30-2008 08:09 PM
date issue-find prevoius date in a patricular format bsandeep_80 UNIX for Advanced & Expert Users 3 11-15-2007 08:42 PM
convert mmddyy date format to ccyyddd format?? Bhups Shell Programming and Scripting 2 09-27-2006 11:30 PM
Date format - Shell scripting gurus please help geomonap Shell Programming and Scripting 3 02-02-2006 05:15 AM
convert date in lilian format for shell (AIX) chocolate AIX 2 11-09-2004 04:48 AM

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 10-10-2008
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by mrx1350 View Post
if i don't use the sh infront of the script, it does not run

Then either put it in a directory in your PATH or call it with an explicit path, e.g., ./myscript, and make sure it is executable.

Or call it with ksh instead of sh.
  #2 (permalink)  
Old 10-10-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink I don't see anything wrong

Can you try a simpler command? Perhaps just setting with date like in my second assignment in my script. Maybe your system does not like part of the date options??

Code:
> cat date_scr
#!/bin/ksh

EXP_LOC=/u02/oradata/exports
NOW=$(date +"%d%m%y")
echo $NOW
NOW2=$(date)
echo $NOW2

> ksh date_scr
101008
Fri Oct 10 08:24:26 PDT 2008
>
Closed Thread

Bookmarks

Tags
date

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 08:17 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