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
Running two commands in one line rdns UNIX for Dummies Questions & Answers 4 04-27-2009 11:04 AM
running script in cron - with ssh commands - not working frustrated1 Shell Programming and Scripting 31 09-16-2008 10:14 AM
Error while running rsh commands !!! csaha Shell Programming and Scripting 3 11-08-2006 01:47 AM
Problem running plsql & unix commands in 1 script siog UNIX for Dummies Questions & Answers 5 10-05-2006 10:46 AM
How to disable running commands from vi Umesh_Sharoff Shell Programming and Scripting 1 07-14-2006 12:05 PM

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

Join Date: Jan 2006
Posts: 6
Question running dirs command from script

I'm new to unix and I have a fairly simple problem:

Lets say I am in a specific directory and I run the command: "dirs" ,

I get an output of all the folders that i pushed into the stack (as expected),
buut,
when when I create a script (called test):
Code:
#! /bin/csh

dirs
and then i run: ./test

It outputs only the last directory that I pushed into the stack (as opposed to the whole stack).For some reason the Script does'nt recognize the stack that I have in the prompt.

whyyy?? Pleeaase help

Last edited by owijust; 01-04-2006 at 03:45 PM..
  #2 (permalink)  
Old 01-05-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
I think that when you run the script, you are creating a new process for which the directory stack is empty. Try using pushd in the script before you run the 'dirs' command.
  #3 (permalink)  
Old 01-09-2006
Gotrain Gotrain is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 5
Post VI Programming

I am new to Linux. I am tring to write a bash shell script. Can someone tell me the proper steps input data to "VI" so that I can execute my script.

Thank In Advance.

Last edited by Gotrain; 01-09-2006 at 07:48 PM..
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 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