02-10-2009
want only file names (not whole path) in shell script
hi i wrote following script,
#!/usr/bin/sh
for index in `ls /tmp/common/*.txt`
do
echo "$index"
done
here index is giving full path but in my program i want only file names (not along with whole path)
Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt
and not like ==> /tmp/common/a.txt /tmp/common/b.txt
any knows how to do it?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Recentily i receive virus ninda and my network was files *.eml.
I find all *.eml with:
find / -name *.eml -print > virus
Virus has the path and name of the file,so, How can i delete all *.eml?
Thanks (2 Replies)
Discussion started by: AlvaroD
2 Replies
2. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
3. Shell Programming and Scripting
In emacs elisp, there is a handy function called file-name-nondirectory which accepts a path and file name and returns just a file name and extension. There is also a function called file-name-directory which just returns the dire ctory name without the file.
How can I implement these same... (2 Replies)
Discussion started by: siegfried
2 Replies
4. Shell Programming and Scripting
Hi,
What's the best way to find all files under a directory - including ones with space - in order to apply a command to each of them. For instance I want get a list of files under a directory and generate a checksum for each file.
Here's the csh script:
#!/bin/csh
set files = `find $1... (5 Replies)
Discussion started by: same1290
5 Replies
5. Shell Programming and Scripting
I want to write a shell script that will rename all the file names to today's date attached to it..
so for example i have a file names like
file1.sales.20081201.txt.c
zbrs.salestxtn.20091101.txt.inn
then it will rename both the files with todays date to it so the file names get changed... (1 Reply)
Discussion started by: rudoraj
1 Replies
6. Shell Programming and Scripting
Hi ,
i need a shell script to poll a particular file in a predefined directory , once that file is found , i need to launch another shell script .
Eg i need to poll for A.txt in /home/username/Desktop
once A.txt is created by Desktop(Created by another Script) , i need to launch another... (2 Replies)
Discussion started by: Vinod H C
2 Replies
7. Shell Programming and Scripting
Hello forum members,
I have to create a out file in the current path./aaa/bbb/ccc/hhh.
i am writing script below.
###script Begins#####
#!/bin/ksh
echo "Weclome"
if
then
echo "Hello"
rm -rf $aaa/bbb/ccc/hhh #clean the exsisting o/p file
echo "no... (2 Replies)
Discussion started by: rajkumar_g
2 Replies
8. UNIX for Dummies Questions & Answers
I have this piece of code
printf '%s\n' $pth*.msf | tr ' ' '\n' | sort -t '-' -k7 -k6r \
| awk -F- '{c=($6$7!=p&&FNR!=1)?ORS:"";p=$6$7}{printf("%c%s\n",c,$0)}'
When I run it I get
/home/chrisd/tatsh/branches/terr0.50/darwin/n02-z30-dsr65-terr0.50-dc0.002-8x6drw-csq.msf... (8 Replies)
Discussion started by: kristinu
8 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have a mail attachment coming from a mail id and evreytime with the same name in .xls format.I have to download the .xls file into a location and convert it itno .csv format and copy the .csv file to another location. (1 Reply)
Discussion started by: bikky6
1 Replies
10. SCO
I am downloading a zip file that contain files that are very long. I am trying to process them, but cannot. I can move the files from one directory to another at the shell prompt, but not within a shell script, I get a stat error.
The files look somewhat like this;
... (5 Replies)
Discussion started by: trolley
5 Replies
LEARN ABOUT DEBIAN
proftmb
PROFTMB(1) User Commands PROFTMB(1)
NAME
proftmb - per-residue prediction of bacterial transmembrane beta barrels
SYNOPSIS
proftmb [options]
DESCRIPTION
proftmb predicts bacterial transmembrane beta barrels from sequence using profile fed Hidden Markov Models (HMM).
Output format
Self-annotating. Letters of prediction: 'i' - inside cytoplasm, 'O' - outside cytoplasm, 'U' - up (on chain moving out of cytoplasm), 'D'
- down (on chain moving into cytoplasm).
References
Bigelow, H. and Rost, B. (2006). PROFtmb: a web server for predicting bacterial transmembrane beta barrel proteins. Nucleic Acids Res,
34(Web Server issue), W186-8.
To invoke the menu, type:
proftmb --menu
The options are:
-d, --directory-root <STRING>
root path where files (options -s,-r,-l,-a,-e,-t,-u,-z,-n) reside
-a, --reduction-state-decode <STRING>
state reduction for decoding
-b, --reduction-state-report <STRING>
state reduction for reporting
-m, --membrane-strand-states <STRING>
list of membrane strand states
-z, --z-curve-file
<STRING> file containing means and sd's at integral length values
-x, --z-calibration-curve <STRING>
file mapping coverage and accuracy values to z-scores
-n, --null-frequency <STRING>
background frequency file
-c, --minimum-score-cutoff <DOUBLE>
minimum z-score for per-residue prediction
-o, --outfile-prefix <STRING>
output file prefix for the three files generated: PREFIX_dat.txt, PREFIX_proftmb_pretty.txt PREFIX_proftmb_tabular.txt
-s, --static-model-data <STRING>
data representing the model architecture
-t, --trained-params <STRING>
params representing the encoded training data
-q, --test-blastQ-file-or-dir <STRING>
psiblast profile (-Q) or directory (full pathname or relative to current directory) with many profiles
-w, --single-sequence-name <STRING>
if -q option points to a single file, this is the name
-v, --list-blastQ-files <STRING>
list of psiblast files to process in directory (leave blank to process all files)
--outfile-pretty <STRING>
pretty output file (overrides automatic name PREFIX_proftmb_pretty.txt)
--outfile-tab
<STRING> tabulated output file (overrides automatic name PREFIX_proftmb_tabular.txt)
--outfile-dat
<STRING> data output file (overrides automatic name PREFIX_dat.txt)
--version
<BOOL> output version information and exit
--quiet
<BOOL> be quiet
EXAMPLES
proftmb @/usr/share/proftmb/options -q /usr/share/doc/proftmb/examples/example.Q -o /tmp/example
The above produces 3 output files: /tmp/example_proftmb_tabular.txt, /tmp/example_proftmb_pretty.txt and /tmp/example_dat.txt. Compare
these to the examples in /usr/share/doc/proftmb/examples.
BUGS
Please report bugs at <https://rostlab.org/bugzilla3/enter_bug.cgi?product=proftmb>.
COPYRIGHT
Copyright (C) 2004 Henry Bigelow
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
proftmb 1.1.10 February 2012 PROFTMB(1)