Sponsored Content
Full Discussion: Piping syntax question
Top Forums UNIX for Dummies Questions & Answers Piping syntax question Post 302260498 by johne1 on Thursday 20th of November 2008 06:00:55 PM
Old 11-20-2008
Piping syntax question

There are are lots of examples of piping output FROM the 'ls' command TO another command, but how does one pipe output TO the 'ls -l' command?

For example, use 'which' to find a file, then use 'ls -l' to view the permissions, groups, etc. in a single step:

which <filename> | ls -l

returns a long listing of the current directory, not a long listing of the filename and path returned by the 'which' command.

which <filename> | ls -l -

returns a file not found error on '-'

Suggestions, please. Thanks!

John
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk syntax question

Hi there could someone explain what is happening in the following function/statement for me, im just a little confused code = 'BEGIN{FS=","} { printf ("%-11s,%s%s%s,%07.2f,%14s,%-3s\n",$1,substr($2,9,2),substr($2,6,2),substr($ 2,3,2),$9,$10,$12) } this function is called later in the... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

2. Shell Programming and Scripting

question about grep, cut, and piping

Howdy folks, I am fairly new to scripting but have lost of expirience in c++, pascal, and a few other. I am trying to complete a file search script that is sent a file name containing data to search that is arranged like this "id","name","rating" "1","bob","7" etc and an argument to... (1 Reply)
Discussion started by: dyrt
1 Replies

3. Programming

Piping Question

I have a piping question, I am trying to implement piping on my own shell and am having some trouble...esentially I am trying to make something to do command|command|command. I can get it to work fine if the last pipe command is not forked, but executes in the shell and then exits..but I need it... (2 Replies)
Discussion started by: mtobin1987
2 Replies

4. UNIX for Dummies Questions & Answers

AWK syntax question

Hi, Have to check file names in some given directory. SO, What is the right syntax here: *$3*=="'$object_list'" - just wanted to check if $3 is in the object_list. And also, Do I need so many quotes around? (5 Replies)
Discussion started by: Leo_NN
5 Replies

5. Shell Programming and Scripting

awk syntax question

Hi I use awk command to delete the first blanc line of a file: awk '/^$/ && !f{f=1;next}1' infile > outfile can somebody please explain me what the last "1'" in !f{f=1;next}1' stands for... Thansk a lot -A (3 Replies)
Discussion started by: aoussenko
3 Replies

6. Shell Programming and Scripting

tar -C syntax question

I am writing a perl script to tar multiple files (in unix) from a given directory to a given output directory. I do NOT want the file path included in the tar, so I've flagged the -C option. Example: tar -cvf tar/1.tar -C htmp/source/ 1-1-1.xml However, I need to do this for a number of target... (3 Replies)
Discussion started by: michanjohns
3 Replies

7. Shell Programming and Scripting

Syntax error piping to bc on command line - works when assigned to var

I have a script which outputs some timing data a line at a time. There are approx. 10 lines echoed, each line looks something like this: 0.741 http://checkip.dyndns.org 94.170.119.226Since I needed to add all the values in the first column, I piped the output to grep, matching and printing the... (7 Replies)
Discussion started by: gencon
7 Replies

8. Shell Programming and Scripting

Question about syntax error

first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe s = `expr ls -s Documents | grep Music | awk '{ print $1 }' ` t = `expr $t + $s` it give syntax error s not found t not found lol... any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies

9. Programming

Perl syntax question

Hallo everybody, I have a following problem - I'm doing a map funciont to fill in a HTML table and I want to use some radiobutton groups. Unfortunatelly, they are grouped by names, so I have to add some "counter" that will divide one row from another, and I'm using CGI.pm for generating the... (3 Replies)
Discussion started by: duskos
3 Replies

10. Shell Programming and Scripting

Question regarding quotation syntax

Hey guys, my first post on UNIX Forums(much overdue IMO)! I've got this bit of code that doesn't seem to be working correctly for an Android app I'm working on: "screen -S gmod1 -p 0 -X stuff " & "" & command.text & "`echo -ne '\015'`""" Basically it types command.text(variable determined... (4 Replies)
Discussion started by: stingwraith
4 Replies
aels(1) 																   aels(1)

NAME
aels - annotated directory listing SYNOPSIS
aels [ option... ][ filename... ] aels -Help aels -VERSion DESCRIPTION
The aels command is used to list information about the files and directories named on the command line. If no files are named, the cur- rent directory is listed. The view presented is from Aegis' perspective. It unifies the development directory with the baseline. OPTIONS
The following options are understood: -Recursive -LOng This option implies the -Show-Mode, -Show-Attributes, -Show-User, -Show-Group, -Show-Size and -Show-When options, unless explic- itly overridden. -Show-Dot-Files This option may be used to show files starting with a dot (.). -Hide-Dot-Files This option may be used to hide files starting with a dot (.). This is the default. -Show-Removed-Files This option may be used to include removed files in the listing. -Hide-Removed-Files This option may be used to exclude removed files from the listing. This is the default. -Show-Mode This option may be used to include the mode column in the listing. The mode column indicates the file type and permissions. -Hide-Mode This option may be used to exclude the mode column from the listing. This is the default. -Show-Attributes This option may be used to include the attributes column in the listing. The attributes column indicates whether the file is part of the change, the project or neither; whether the file is being created, modified or removed; whether the file is a source file, a test file, or neither. This is the default. -Hide-Attributes This option may be used to exclude the attributes column from the listing. -Show-User This option may be used to include file owner information in the listing. -Hide-User This option may be used to exclude file owner information from the listing. This is the default. -Show-Group This option may be used to include file group information in the listing. -Hide-Group This option may be used to exclude file group information from the listing. This is the default. -Show-Size This option may be used to include file size information in the listing. -Hide-Size This option may be used to exclude file size information from the listing. This is the default. -Show-When This option may be used to include the file modification time in the listing. -Hide-When This option may be used to exclude the file modification time from the listing. This is the default. -Help This option may be used to obtain more information about how to use the aels program. See also aegis(1) for options common to all aegis commands. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-project, "-PROJ" and "-p" are all interpreted to mean the -Project option. The argument "-prj" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line, after the function selectors. The GNU long option names are understood. Since all option names for aels are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood. EXIT STATUS
The aels command will exit with a status of 1 on any error. The aels command will only exit with a status of 0 if there are no errors. ENVIRONMENT VARIABLES
See aegis(1) for a list of environment variables which may affect this command. See aepconf(5) for the project configuration file's project_specific field for how to set environment variables for all commands executed by Aegis. SEE ALSO
ls(1) list directory contents aefind(1) search for files in directory hierarchy ael cf List change files. ael pf List project files. COPYRIGHT
aels version 4.24.3.D001 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Peter Miller The aels program comes with ABSOLUTELY NO WARRANTY; for details use the 'aels -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'aels -VERSion License' command. AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au //* WWW: http://www.canb.auug.org.au/~millerp/ Reference Manual Aegis aels(1)
All times are GMT -4. The time now is 10:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy