The UNIX and Linux Forums  

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
Need to Write Shell Script based off of this shell command Rally_Point Shell Programming and Scripting 3 06-10-2009 06:19 PM
Help need to make a shell script run for ffmpeg vhook watermaking in shell wingchun22 Shell Programming and Scripting 1 09-27-2008 07:52 AM
How to Start a Shell as Login shell instead of ordinary shell Sivaswami Linux 3 07-01-2008 02:52 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 03:27 AM
How to run unix commands in a new shell inside a shell script? hkapil Shell Programming and Scripting 2 01-04-2006 06:56 AM

Reply
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 07-01-2009
Mastermind2009 Mastermind2009 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 3
Shell with ls- l

I'm new to Unix, but I'm trying to write a shell script to pipe the output of the ls –lcommand into the utility named more. I want to name the file display.

Any help would be appreciated.

  #2 (permalink)  
Old 07-01-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,400
???#@$!$
not able to understand what exactly you want...
  #3 (permalink)  
Old 07-01-2009
Mastermind2009 Mastermind2009 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 3
I want to create a shell script named display. I then want it to pipe the output of the ls -l command.

From my understanding ls -l displays the r/w/x properties of files in a directory...

That explain any better?

Sorry about way I type, I'm new to Unix.
  #4 (permalink)  
Old 07-01-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,400
so you want to view the ls -l commands o/p pagewise??
if so do following steps
1)vi display
2)press "i"
3)type ls -l|more
4)press escape then type :wq
5)chmod 755 display
6). ./dispaly

enjoy..
  #5 (permalink)  
Old 07-01-2009
Mastermind2009 Mastermind2009 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 3
Thank you, I believe you figured out what I was meaning.
  #6 (permalink)  
Old 07-03-2009
laurentv laurentv is offline
Registered User
  
 

Join Date: Mar 2009
Location: Montreal, Canada
Posts: 33
You could use bash aliases ...
in your home directory edit a .bashrc file and add alias:
alias lsp='ls -l|more'
alias ll='ls -ail'
...
  #7 (permalink)  
Old 07-05-2009
chipmunken chipmunken is offline
Registered User
  
 

Join Date: Jun 2009
Location: sweden, stockholm
Posts: 10
Quote:
Originally Posted by laurentv View Post
You could use bash aliases ...
in your home directory edit a .bashrc file and add alias:
alias lsp='ls -l|more'
alias ll='ls -ail'
...
whar I was thinking about when I was reading first post
Reply

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 09:12 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