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
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 10:10 AM
SSH Problem auth problem budrito UNIX for Advanced & Expert Users 1 03-17-2004 10:12 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 11-20-2007
srikanthshastry srikanthshastry is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 1
Please help problem in KSH

Hi All,

I have got a problem. I have written a Shell script which cuts some information from the file a and puts it in file b. But i get this error when i execute the shell script.
This is what i have written in the script.

#! /usr/bin
cd /test
ls $2 > a
cut -f 1 -d '.' a > b


When i try to execute this script with this command-->
./test.sh 100 Eagle.txt
i get this error -> cut: 0653-132 Cannot open a.

i know its a dumb doubt.Please help
  #2 (permalink)  
Old 11-20-2007
Kundunni Kundunni is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 18
You are doing a cd to /test . I think you do not have Eagle.txt in /test and is causing the problem. You need to copy Eagle.txt to /test and then run the script
  #3 (permalink)  
Old 11-20-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
That first line can't be right. Try:
#! /usr/bin/ksh
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 03:34 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