Sponsored Content
Top Forums Shell Programming and Scripting How I can capture the last file in a directory in windows Post 302410764 by joeyg on Tuesday 6th of April 2010 08:25:52 PM
Old 04-06-2010
Hammer & Screwdriver last file

Code:
lastfile=`ls -1 myfile* | tail -1`
echo $lastfile

Note that this will take the last file alphabetically that begins with myfile. You could substitute any other filter and/or use other logic to sort the list.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

moving files from a unix directory to a windows directory

Any body any ideas i'm failry new to this so any help would be appreciated. Cheers Steve (2 Replies)
Discussion started by: gleads
2 Replies

2. UNIX for Advanced & Expert Users

Capture Value from file

I have a file in the following Format Fundid: 100-BankA AccountNumber Balance 1 200 2 300 3 400 FundId:123321-BankB AccountNumber Balance 1 200 3 100 ........... I can have N number of funds. (1 Reply)
Discussion started by: kris01752
1 Replies

3. Shell Programming and Scripting

capture the file name

I am trying to capture the file name(which is not of fixed length) and put it in a variable. It is working in unix whereas when I am running the same script in Informatica it is not giving me the desired output. But when I comment the option(find the file name) then it is working fine. It can... (4 Replies)
Discussion started by: Mandab
4 Replies

4. Shell Programming and Scripting

Script to capture new lines in a file and copy it to new file

Hi All, I have a file that gives me new line/output every 5 minutes. I need to create a script that capture new line/output besides "IN CRON_STATUS", in this case the new output is "begin ------ cron_status.sh - -----------". I want this script to capture the line starting from "begin ------... (0 Replies)
Discussion started by: fara_aris
0 Replies

5. Shell Programming and Scripting

capture output of file and send last string thereof to new file

Hello, If I run a program from within shell, the output is displayed in the command line terminal. Is there a way I can capture that output and choose only the very last string in it to send it to a new file? Thank you (6 Replies)
Discussion started by: Lorna
6 Replies

6. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

7. UNIX for Dummies Questions & Answers

Copy directory from Linux to Windows

Hola a todos, soy realmente nuevo programando en bash, y aśn estoy encontrando bastantes baches :o, mi pregunta es simple, supongo, alguien podria decirme si existe una manera facil de copiar un directorio de un server a otro?, sucede que en un server(server1) tengo los backup de las bases de... (7 Replies)
Discussion started by: yeestrada
7 Replies

8. Programming

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (1 Reply)
Discussion started by: MIS
1 Replies

9. Solaris

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (3 Replies)
Discussion started by: MIS
3 Replies

10. AIX

Samba 3.6 on AIX 7.1 - Windows 10 Access to AIX file shares using Active Directory authentication

I am running AIX 7.1 and currently we have samba 3.6.25 installed on the server. As it stands some AIX folders are shared that can be accessed by certain Windows users. The problem is that since Windows 10 the guest feature no longer works so users have to manually type in their Windows login/pwd... (14 Replies)
Discussion started by: linuxsnake
14 Replies
FvwmScroll(1)						      General Commands Manual						     FvwmScroll(1)

NAME
FvwmScroll - the FVWM scroll-bar module SYNOPSIS
FvwmScroll is spawned by fvwm, so no command line invocation will work. DESCRIPTION
The FvwmScroll module prompts the user to select a target window, if the module was not launched from within a window context in Fvwm. After that, it adds scroll bars to the selected window, to reduce the total desktop space consumed by the window. FvwmScroll reads the same .fvwmrc file as fvwm reads when it starts up, and looks for lines similar to "*FvwmScrollFore green". FvwmScroll should not be used with windows which move or resize themselves, nor should it be used with windows which set the WM_COL- ORMAP_WINDOWS property. Operation is fine with windows that have a private colormap. COPYRIGHTS
The FvwmScroll program, and the concept for interfacing this module to the Window Manager, are all original work by Robert Nation. Copyright 1994, Robert Nation. No guarantees or warranties or anything are provided or implied in any way whatsoever. Use this program at your own risk. Permission to use this program for any purpose is given, as long as the copyright is kept intact. INITIALIZATION
During initialization, FvwmScroll will eventually search a configuration file which describes the colors to use. The configuration file is the same file that fvwm used during initialization. If the FvwmScroll executable is linked to another name, ie ln -s FvwmScroll MoreScroll, then another module called MoreScroll can be started, with a completely different configuration than FvwmScroll, simply by changing the keyword FvwmScroll to MoreScroll. INVOCATION
FvwmScroll can be invoked by binding the action 'Module FvwmScroll x y' to a menu or key-stroke in the .fvwmrc file. The parameter x and y are integers, which describe the horizontal and vertical window size reduction. Fvwm will search directory specified in the ModulePath configuration option to attempt to locate FvwmScroll. Although nothing keeps you from launching FvwmScroll at start-up time, you probably don't want to. CONFIGURATION OPTIONS
FvwmScroll reads the same .fvwmrc file as fvwm reads when it starts up, and looks for lines as listed below: *FvwmScrollFore color Tells the module to use color instead of grey for scroll bars themselves. *FvwmScrollBack color Tells the module to use color instead of black for the window background. BUGS
When the scroll bars are removed by clicking on the button in the lower right corner, the window does not restore its location correctly. AUTHOR
Robert Nation 3rd Berkeley Distribution April 14 1994 FvwmScroll(1)
All times are GMT -4. The time now is 01:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy