Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Listing all the files names not starting as Post 302261285 by valluvan on Monday 24th of November 2008 08:39:56 AM
Old 11-24-2008
Quote:
Originally Posted by Franklin52
Try this:
Code:
ls -l |awk '/^-/ && $NF !~ /^abc/ && $NF !~ /^efg/ {print $NF}'

Thanks Frank when I assign this code to a variable and try to print the variable contents it just prints nothing.

I do this:

FILELIST=`ls -l |awk '/^-/ && $NF !~ /^abc/ && $NF !~ /^efg/ && $NF ~ /.out/ {print $NF}'`
echo $FILELIST


Neither does this work:
FILELIST=`echo ls -l |awk '/^-/ && $NF !~ /^abc/ && $NF !~ /^efg/ && $NF ~ /.out/ {print $NF}'`
echo $FILELIST

Please help..Ideally it shold be printing the file name whose extension is .out and not begining with abc or efg
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. UNIX for Dummies Questions & Answers

Listing full file names with the exact length of 3 characters

This is what I have to do: Display the full file name (including the full path) and file size of all files whose name (excluding the path) is exactly 3 characters long. This is the code I have: find / -printf "Name: %f Path: %h Size: %s (bytes)\n" 2>/dev/null | grep -E "Name: .{3,} Path" |... (7 Replies)
Discussion started by: Joesgrrrl
7 Replies

3. Shell Programming and Scripting

perl script for listing files and mailing the all files

Hi, I am new to perl: I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory. advanced thanks for valuable inputs. Thanks Prakash GR (1 Reply)
Discussion started by: prakash.gr
1 Replies

4. Shell Programming and Scripting

Listing file names as soon as they are created

Hi, I have been looking for a method to list file names as soon as they are created. I have used the following command : find . -name "*.xml" -mmin -2 -exec ls --full-time {} \; | sort -k6 this finds all xml files created in the last 2 minutes and orders them by time. The problem is that... (7 Replies)
Discussion started by: phil.e.b
7 Replies

5. UNIX for Advanced & Expert Users

script regarding listing long group names

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies

6. Shell Programming and Scripting

Get all File names starting with letter P

Hi, I have lets say 10 files , I need to process them one by one. So I need a command to get one file name at a time to process it into a variable Example Files P1111.dat P3344.dat S344.dat ... v_file_name = 'p111.dat' .. I will rename it to something after processing ... (1 Reply)
Discussion started by: prassu
1 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Listing files starting with p or f and with the exact length of 3 characters

Hello, I need some help. How can I list files starting with p or f and with the exact length of 3 characters? (2 Replies)
Discussion started by: airbebe
2 Replies

8. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

9. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

10. UNIX for Dummies Questions & Answers

Listing column names in CSV file

Hi, I have a .csv file that has ~600 columns and thousands of rows. I would like to create a numerical list of the column names (so that I can later easily select the columns I want to extract). The format that I would hope for is something like: 1 "ID" 2 "X" 3 "Y" .. 600 "Z" ... (4 Replies)
Discussion started by: aberg
4 Replies
xotclsh(1)							XOTcl Applications							xotclsh(1)

__________________________________________________________________________________________________________________________________________________

NAME
xotclsh - Tcl Shell containing object-oriented scripting language XOTcl SYNOPSIS
xotclsh ?filename arg arg ...? _________________________________________________________________ DESCRIPTION
xotclsh is a shell-like application that reads XOTcl commands from its standard input or from a file and evaluates them. Similarly as the relation between tclsh and wish, xowish provides all functionality of xotclsh and provides as well predefined support for TK widgets. XOTcl (XOTcl, pronounced exotickle) is an object-oriented scripting language based on MIT's OTcl. It is intended as a value added replace- ment of OTcl. Scripting languages, such as Tcl, are designed for glueing components together, provide features such as dynamic extensibility and dynamic typing with automatic conversion, that make them well suited for rapid application development. The object system of XOTcl enables a user to to define objects, classes, and meta-classes. Classes are special objects with the purpose of managing other objects. ``Managing'' means that a class controls the creation and destruction of its instances and that it contains a repository of methods accessible for the instances. Every object may be enhanced with object-specific methods. XOTcl supports single and multiple inheritance. All object-class and class-class relationships in XOTcl are introspectable and can be dynamically changed at arbi- trary times. Ambiguities in name resolution of methods are avoided through method chaining through "next", which does not require explicit method naming. XOTcl combines the ideas of scripting and object-orientation in a way that preserves the benefits of both of them. It is equipped with sev- eral new language constructs that help building and managing complex systems. We added the following support: Dynamic Object Aggregations, to provide dynamic aggregations through nested namespaces (objects). Nested Classes, to reduce the interference of independently developed program structures. Assertions, to reduce the interface and the reliability problems caused by dynamic typing and, therefore, to ease the combination of many components. Meta-data, to enhance self-documentation of objects and classes. Per-object mixins, as a means to give an object dynamically access to the methods of one or several supplemental classes. Per-class mixins, as a means to give all instances of an class dynamically access to the methods of one or several supplemental classes. Filters as a means of abstractions over method invocations to implement large program structures, like design patterns. XOTcl provides a value-added replacement of Tcl package loading providing integration with object-oriented constructs and tracking/tracing of component loading. VARIABLES
xotclsh sets all variables that tclsh sets, and additionally the following variables: ::xotcl::version XOTcl version number. ::xotcl::confdir Directory for XOTcl configuration. ::xotcl::logdir Directory where logfiles are placed. KEYWORDS
argument, interpreter, prompt, script file, shell XOTcl xotclsh(1)
All times are GMT -4. The time now is 12:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy