07-13-2005
Try
ls -t $searchstring | head -n 1 | read fileyouwant
or
fileyouwant=$(ls -t $searchstring | head -n 1)
I am using ksh.
If you create a script around it, use the normal #!/bin/ksh first line.
Greetings, William.
10 More Discussions You Might Find Interesting
1. Programming
hey
i want to extract an argument from double qoutes, eg: when the user enters:
prompt "mile"
i need to extract everything within the double quotes, in my case, mile, and save it to a string. feedback/code would be appreciated
thanks
mile1982 (1 Reply)
Discussion started by: mile1982
1 Replies
2. UNIX for Advanced & Expert Users
In order to save diskspace and avoid of disk full during
unzip then extract the tar file
is there any tar unzip command would unzip and extract tar at the same time
(test123.tar.gz)
thank in advance (6 Replies)
Discussion started by: darkrainbow
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to view/display the contents of one file in tar file.
For example if the tar file is sam.tar.gz and one of the file inside is E1.txt, how do i view the contents of this E1.txt file.
Olso if I want to extract the E1.txt file only from sam.tar.gz how can i do that.
Thanks in... (7 Replies)
Discussion started by: icefish
7 Replies
4. UNIX for Advanced & Expert Users
I just want to extract one sigle file from an .ear archieve instead of extracting whole ear.
Can anyone help me on this? (4 Replies)
Discussion started by: harshal_dcx
4 Replies
5. Shell Programming and Scripting
Hello All,
I need to extract lines from a file that contains ALPHANUMERIC and the length of Alphanumeric is set to 16. I have pasted the sample of the lines from the text file that I have created.
My problem is that sometimes 16 appears in other part of the line. I'm only interested to... (14 Replies)
Discussion started by: mnassiri
14 Replies
6. UNIX for Dummies Questions & Answers
I have these files in a directory. It may have more class than the sample below:
DEPT_CHEM101LEC_D_20110301.DAT
DEPT_CHEM101LAB_D_20110301.DAT
DEPT_BIO105LEC_D_20110325.DAT
DEPT_BIO105LAB_D_20110325.DAT
DEPT_CSC308LEC_D_20110327.DAT
DEPT_CSC308LAB_D_20110327.DAT
Is there way to extract out... (5 Replies)
Discussion started by: lv99
5 Replies
7. Shell Programming and Scripting
Hi,
I am having an file 20110909.tar.gz (path-home/user01/archive/20110909.tar.gz ), contains some log files some csv files
I want to extract that files . if i run "ls" command then their should be display all the log files and csv files on the same path.
please help me to know the... (4 Replies)
Discussion started by: aish11
4 Replies
8. Shell Programming and Scripting
When I try to extract tty from ps command , at time we get output , at times we dont.
for eg i executed below quesry continulusly for some time,Actually i feel its because sometime pid allocated has some additional space at begining which causes this issue.
->ps | grep "/-ksh" | tail -1 | cut -f4... (2 Replies)
Discussion started by: lalitpct
2 Replies
9. Shell Programming and Scripting
hello,
i have publicly available txt file with little less than 300000 rows. i want to extract from column 1 to column 218 and save it in another text file. i use the cut command but the file is saved with multiple rows from the source file onto a single row in the destination. basically it is... (6 Replies)
Discussion started by: madrazzii
6 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have records in unix file like below. In this file, we have empty fields from 4th Column to 22nd Column. I have some 200000 records in a file. I want to extract records only which have empty fields from 4th field to 22nd filed. This file is comma separated file. what is the unix... (2 Replies)
Discussion started by: rakeshp
2 Replies
LEARN ABOUT DEBIAN
dh_installmime
DH_INSTALLMIME(1) Debhelper DH_INSTALLMIME(1)
NAME
dh_installmime - install mime files into package build directories
SYNOPSIS
dh_installmime [debhelperoptions] [-n]
DESCRIPTION
dh_installmime is a debhelper program that is responsible for installing mime files into package build directories.
It also automatically generates the postinst and postrm commands needed to interface with the debian mime-support and shared-mime-info
packages. These commands are inserted into the maintainer scripts by dh_installdeb(1).
FILES
debian/package.mime
Installed into usr/lib/mime/packages/package in the package build directory.
debian/package.sharedmimeinfo
Installed into /usr/share/mime/packages/package.xml in the package build directory.
OPTIONS
-n, --noscripts
Do not modify postinst/postrm scripts.
NOTES
Note that this command is not idempotent. dh_prep(1) should be called between invocations of this command. Otherwise, it may cause multiple
instances of the same text to be added to maintainer scripts.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
9.20120909 2012-09-10 DH_INSTALLMIME(1)