#!/bin/sh
filename=$1
echo "The program that you will be editing is called $filename"
if [ -f "$filename" ]
then
if [ -r "$filename" ]
then
grep "//" "$filename"
else
printf "%s is not readable\n" "$filename"
fi
else
printf "%s does not exist\n" "$filename"
fi
Hi,
I have a question on bash. Basically I would like to print a file name using bash. I am actually trying to grep a particular character in sequential files.
I have alot files such that a.txt, b.txt,c.txt...etc.
If I found a certain character, I would print that particular filename.
I... (5 Replies)
Hi,
Is it possible to accept a filename as command line parameter and then write to that file using command redirection? i tried the below script.
outputfile=`echo $1`
echo "Writing to file" > 'echo $outputfile'
exit $returncode
but it isnt working. is there any other way to... (9 Replies)
Anyone who can assist :
I am trying to pass the group vairiable to a filename:
rpt_tsavegrp=/export/legato/scripts/$group_savegrp_rpt.$dat
It will not pass to variable.
Anyone have any ideas what I am doing wrong here.
Thanks
# This script sends email that save group completed.... (3 Replies)
Hello, i'm fairly new to scripting, so please bear with me (I did try looking this up first, i figured it had to have been asked already).
#!/bin/bash
fileName=`date | sed -n 's/ /_/g p' | sed -n 's/^/Backup_/p' | sed -n 's/$/\.tar/p'`; #THIS SETS BACKUP_DATE
echo $fileName #TEST OF VALUE
... (4 Replies)
Hi,
Below is starting entry of my script
#!/bin/ksh
Usage()
{
print "Usage: $0 ID OPTION SERVER"
print "<br>Where :"
print "<br>Enter your ID into PARAM1, OPTION in the PARAM2 and SERVER in the PARAM3 field"
print "<br>ID should be a valid ID"
print "<br>OPTION should be either... (2 Replies)
Hi,
Can anyone let me know what is difference between
grep .* foo.c
grep '.*' foo.c
I am not able to understand what is exact difference.
Thanks in advance (2 Replies)
I want to print the filename
keyword="XXTNL_AVSKRIV2ING"
ftype="sql'
I wan to search the keyword in all the sql files and the output shoul dbe filename:count
grep -iwc "$keyword" *.$ftype | grep -v ":0$"
But the output does not dispaly the filename which contains space as... (4 Replies)
I am using a shell script in fedora linux. While calling to the shell I am also passing an argument (var1=0.77) like shown below
sh gossip.sh var1=0.77
in the shell following command is written (which doesn't work)
sed - i -e 's@prob=@prob="$var1";//@g' file.txt
Actually i want the... (7 Replies)
There is a file name list_filenames.dat, this has all the list of all files I need to encrypt, I did not understand what the following syntax is doing:
grep -s "^$1" list_filenames.dat, when I manually run this command it just returns all the lines, what is the usage of this ? can someone... (4 Replies)
I call my bash shell script "test.sh" and pass "admin_usr.txt" as an argument like below.
./test.sh admin_usr.txt
Inside the "test.sh" i wish to check if the filename passed "admin_usr.txt" i.e "$1" contains the string "admin" or not ... which in this case it does.
Note: I do not wish to... (5 Replies)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT DEBIAN
blastclust
BLASTCLUST(1) NCBI Tools User's Manual BLASTCLUST(1)NAME
blastclust - BLAST score-based single-linkage clustering
SYNOPSIS
blastclust [-] [-C] [-L X] [-S X] [-W N] [-a N] [-b F] [-c filename] [-d filename] [-e F] [-i filename] [-l filename] [-o filename] [-p F]
[-r filename] [-s filename] [-v [filename]]
DESCRIPTION
blastclust automatically and systematically clusters protein or DNA sequences based on pairwise matches found using the BLAST algorithm in
case of proteins or Mega BLAST algorithm for DNA. In the latter case a single Mega BLAST search is performed for all the sequences combined
against a database created from the same sequences. blastclust finds pairs of sequences that have statistically significant matches and
clusters them using single-linkage clustering.
OPTIONS
A summary of options is included below.
- Print usage message
-C Complete unfinished clustering
-L X Length coverage threshold (default = 0.9)
-S X Score coverage threshold (bit score / length if < 3.0, percentage of identities otherwise; default = 1.75)
-W N Use words of size N (length of best perfect match; zero invokes default behavior: 3 for proteins, 32 for nucleotides)
-a N Number of CPU's to use (default = 1)
-b F Do not require coverage on both neighbours
-c filename
Read advanced options from configuration file filename
-d filename
Input as a database
-e F Disable id parsing in database formatting
-i filename
FASTA input file (program will format the database and remove files in the end; default = stdin)
-l filename
Restrict reclustering to id list in filename
-o filename
Output file for list of clusters (default = stdout)
-p F Input is nucleotides, not proteins.
-r filename
Restore neighbors for reclustering from filename
-s filename
Save all neighbours to filename
-v [filename]
Print verbose progress messages (to filename)
AUTHOR
The National Center for Biotechnology Information.
SEE ALSO blast(1), formatdb(1), /usr/share/doc/blast2/blastclust.html, <http://www.ncbi.nlm.nih.gov/BLAST/>
NCBI 2004-06-25 BLASTCLUST(1)