Sponsored Content
Full Discussion: List of file names
Top Forums Shell Programming and Scripting List of file names Post 302494189 by kristinu on Sunday 6th of February 2011 02:59:00 AM
Old 02-06-2011
List of file names

I have the following list of file names stored in $fnames, so that if I do

Code:
 
  foreach f ($fnames)
    echo "$f"
  end

I will get

Code:
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run3
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run4
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run5
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run6
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run3
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run4
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run5
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw-run6
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run3
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run4
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run5
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run6
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw-run7
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run3
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run4
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run5
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run6
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw-run7
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run3
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run4
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run5
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw-run6

I want to create a list of the various filenames without the -run tag.

In other words, I want to have the list

Code:
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw
n02-z30-sr65-rgdt0p50-dc0p004-16x12drw
n02-z30-sr65-rgdt0p50-dc0p006-16x12drw
n02-z30-sr65-rgdt0p50-dc0p008-16x12drw
n02-z30-sr65-rgdt0p50-dc0p01-16x12drw

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Pass a list of file names to ls

Hi I have a list of file names generated from a find command. The list does not show complete file information. I would like to do this: generate the list of file names pass each file name generated to ls -l command what is the best way to do this without a script? I have tried... (2 Replies)
Discussion started by: GMMike
2 Replies

2. AIX

find for specific content in file in the directory and list only file names

Hi, I am trying to find the content of file using grep and find command and list only the file names but i am getting entire file list of files in the directory find . -exec grep "test" {} \; -ls Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies

3. UNIX for Dummies Questions & Answers

Get List of Unique File Names

I have a large directory of web pages. I am doing a search through the web pages using grep and would like to get a list of unique file names of search results. The following command works fine to give me a list of file names where term appears: grep -l term *.html However, since these are... (3 Replies)
Discussion started by: rjulich
3 Replies

4. UNIX for Dummies Questions & Answers

Help with list of latest file names

Hi Gurus, I need to list only those files which are most recent and the latest log file. For example if I have the following file list: JOB001.LOG_00uv02_00006 - Jul 7 12:16 JOB001.LOG_00vi0t_00001 - Aug 4 21:58 JOB001.LOG_00vi0t_00002 - Aug 5 09:15 JOB001.LOG_00vi0t_00003 - Aug 5... (6 Replies)
Discussion started by: shash
6 Replies

5. Shell Programming and Scripting

get file names from the list

Hi Experts, Here is my scenario: Am maintaining a file which has list of logs with complete path and file names like bleow a/b/c/Daily/file1_20111012.log d/e/f/Monthly/file1_20111001.log g/h/Daily/file1_20110120.log i/Daily/file1_20110220.log How to copy the file names frm the list... (7 Replies)
Discussion started by: laxm
7 Replies

6. Shell Programming and Scripting

How to get the dates from a list of file names?

Hi All, I have a .txt file with the list of filenames as given below. /dev_data/dev3/ctl/20120622_Employee.txt /dev_data/dev3/ctl/20120623_Employee.txt /dev_data/dev3/ctl/20120624_Employee.txt I want to read this file & write the dates alone from the filenames into a .done file. ... (6 Replies)
Discussion started by: dsfreddie
6 Replies

7. Shell Programming and Scripting

List the file names that differ

Hello, I have two directories - prev and current . They both have same multiple subdirectories and files. Now the current directory can have some updated files and some new files added that is not in prev. I want to find the list of file names that differ. I am doing this because i can not... (2 Replies)
Discussion started by: jakSun8
2 Replies

8. UNIX for Dummies Questions & Answers

List Directory names which have the file

Hi All, Can any one help me to list out the directory names which contain the specified file. See for example File name : file.201307014.LKT Have the directory structure as below. /app/work/data/INDIA/file.201307014.LKT /app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Discussion started by: Balasankar
5 Replies

9. Shell Programming and Scripting

List the file names available on FTP server before selecting the required file

Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies

10. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies
PAM_FILTER(8)							 Linux-PAM Manual						     PAM_FILTER(8)

NAME
pam_filter - PAM filter module SYNOPSIS
pam_filter.so [debug] [new_term] [non_term] run1|run2 filter [...] DESCRIPTION
This module is intended to be a platform for providing access to all of the input/output that passes between the user and the application. It is only suitable for tty-based and (stdin/stdout) applications. To function this module requires filters to be installed on the system. The single filter provided with the module simply transposes upper and lower case letters in the input and output streams. (This can be very annoying and is not kind to termcap based editors). Each component of the module has the potential to invoke the desired filter. The filter is always execv(2) with the privilege of the calling application and not that of the user. For this reason it cannot usually be killed by the user without closing their session. OPTIONS
debug Print debug information. new_term The default action of the filter is to set the PAM_TTY item to indicate the terminal that the user is using to connect to the application. This argument indicates that the filter should set PAM_TTY to the filtered pseudo-terminal. non_term don't try to set the PAM_TTY item. runX In order that the module can invoke a filter it should know when to invoke it. This argument is required to tell the filter when to do this. Permitted values for X are 1 and 2. These indicate the precise time that the filter is to be run. To understand this concept it will be useful to have read the pam(3) manual page. Basically, for each management group there are up to two ways of calling the module's functions. In the case of the authentication and session components there are actually two separate functions. For the case of authentication, these functions are pam_authenticate(3) and pam_setcred(3), here run1 means run the filter from the pam_authenticate function and run2 means run the filter from pam_setcred. In the case of the session modules, run1 implies that the filter is invoked at the pam_open_session(3) stage, and run2 for pam_close_session(3). For the case of the account component. Either run1 or run2 may be used. For the case of the password component, run1 is used to indicate that the filter is run on the first occasion of pam_chauthtok(3) (the PAM_PRELIM_CHECK phase) and run2 is used to indicate that the filter is run on the second occasion (the PAM_UPDATE_AUTHTOK phase). filter The full pathname of the filter to be run and any command line arguments that the filter might expect. MODULE TYPES PROVIDED
All module types (auth, account, password and session) are provided. RETURN VALUES
PAM_SUCCESS The new filter was set successfully. PAM_ABORT Critical error, immediate abort. EXAMPLES
Add the following line to /etc/pam.d/login to see how to configure login to transpose upper and lower case letters once the user has logged in: session required pam_filter.so run1 /lib/security/pam_filter/upperLOWER SEE ALSO
pam.conf(5), pam.d(5), pam(7) AUTHOR
pam_filter was written by Andrew G. Morgan <morgan@kernel.org>. Linux-PAM Manual 06/04/2011 PAM_FILTER(8)
All times are GMT -4. The time now is 03:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy