Sponsored Content
Top Forums Shell Programming and Scripting Passing gunzipped filename to a variable Post 302671767 by Scrutinizer on Saturday 14th of July 2012 12:49:43 PM
Old 07-14-2012
Another approach might be:
Code:
f=$(gzip -l filename | awk 'NR==2{print $NF}')
gunzip filename

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

passing a variable inside a variable to a function

I would like to know how to pass a variable inside a variable to a function. sample code below -------------- for x in 1 9 do check_null $C$x ##call function to check if the value is null if then echo "line number:$var_cnt,... (2 Replies)
Discussion started by: KingVikram
2 Replies

2. Shell Programming and Scripting

mv Filename variable to another filename

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)
Discussion started by: gzs553
3 Replies

3. Shell Programming and Scripting

Passing Filename as a Parameter to Another script

Hi, I have a requirement to write a script file(script1.sh) to read the file from the folder say /usr1/profiles/active and pass the file name as a parameter to another script file say (script2.sh) which would subsitute this parameter. The script2.sh will have a line like the one below ... (1 Reply)
Discussion started by: ravisg
1 Replies

4. Shell Programming and Scripting

passing a variable inside another variable.

Any help would be great. I know this is a dumb way of doing this, but I would like to know if there is a solution doing it this way. I'm very new at this and I'd like to learn more. Thanks! :D:D count=0 while ; do echo "enter your name" read name_$count let count=count+1 done ... (2 Replies)
Discussion started by: reconflux
2 Replies

5. Shell Programming and Scripting

variable used as filename

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)
Discussion started by: jzacsh
4 Replies

6. Shell Programming and Scripting

Passing filename as parameter and displaying the file contents

Hi All, Its extremely urgent regarding the following requirement. I have created few files in a directory. I have write a program in shell scripting such that it prompts for the filename . once the filename is entered,it should print the contents of the file. Can anyone help with... (7 Replies)
Discussion started by: radhi2424
7 Replies

7. Shell Programming and Scripting

Passing filename dynamically in SPOOL of SQL*PLUS in shell script

Hi all, I am executing shell script in which I am using SQLLDR In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following Spool... (2 Replies)
Discussion started by: shekharjchandra
2 Replies

8. Shell Programming and Scripting

Passing dynamic variable within another variable.

I have a small program which needs to pass variable dynamically to form the name of a second variable whose value wil be passed on to a third variable. ***************** Program Start ****************** LOC1=/loc1 PAT1IN=/loc2 PAT2IN=/loc3 if ; then for fpattern in `cat... (5 Replies)
Discussion started by: Cyril Jos
5 Replies

9. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

I have a below syntax its working fine... var12=$(ps -ef | grep apache | awk '{print $2,$4}') Im getting expected output as below: printf "%b\n" "${VAR12}" dell 123 dell 456 dell 457 Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies

10. Programming

Python passing filename through argument

Hello, A python beginner question on passing filename thru argument. My code is: #!/usr/bin/python import sys, getopt import os def main(argv): try: opts, args = getopt.getopt(sys.argv,"hi:o:ce", ) except getopt.GetoptError: usage() print("Usage: %s... (6 Replies)
Discussion started by: yifangt
6 Replies
ASN2ALL(1)						     NCBI Tools User's Manual							ASN2ALL(1)

NAME
asn2all - generate reports from ASN.1 biological data SYNOPSIS
asn2all [-] [-A acc] [-F filename] [-G] [-J n] [-K n] [-M] [-T] [-X] [-a type] [-b] [-c] [-d path] [-f format] [-h] [-i filename] [-k] [-l] [-n policy] [-o filename] [-p path] [-r] [-v filename] [-x ext] DESCRIPTION
asn2all is primarily intended for generating reports from the binary ASN.1 Bioseq-set release files downloaded from the NCBI ftp site (ncbi-asn1 directory). It can produce GenBank and GenPept flatfiles, FASTA sequence files, INSDSet structured XML, TinySeq XML, and Sequin-style 5-column feature tables. The release files (which have the extension .aso.gz) should be uncompressed with gunzip(1), resulting in files with the extension .aso. For example, gbpri1.aso is the first file in the primate division, and the command gunzip gbpri1.aso.gz will result in gbpri1.aso being created. The original gbpri1.aso.gz file is removed after successful decompression. In asn2all, the name of the file to be processed is specified by the -i command line argument. Use -a t to indicate that it is a release file and -b to indicate that it is binary ASN.1. A text ASN.1 file obtained from Entrez can be processed by using -a a instead of -a t -b. Nucleotide and protein records can be processed simultaneously. Use the -o argument to indicate the nucleotide output file, and the -v argument for the protein output file. The -f argument determines the format to be generated, and is documented in more detail (along with other options) in the following sec- tion. OPTIONS
A summary of options is included below. - Print usage message -A accession Accession to fetch; may take the form accession,complexity,flags where complexity should normally be 0 and a flags value of -1 enables fetching of external features -F filename Accession Filter file -G Relaxed Genome Mapping -J n Seq-loc from -K n Seq-loc to -M Seq-loc Minus strand -T Use Threads -X EXtended qualifier output -a type Input ASN.1 type: a Automatic (default) c Catenated z Any e Seq-entry b Bioseq s Bioseq-set m Seq-submit t batch processing (suitable for official releases; autodetects specific type) -b Bioseq-set is Binary -c Bioseq-set is Compressed -d path Path to indexed binary ASN.1 Data -f format Output Format: g GenBank/GenPept (default) m GenBank Master Style f FASTA d CDS FASTA e Gene FASTA t Sequin-style 5-column feature table y TinySet XML (akin to FASTA) s INSDSet XML (akin to GenBank/GenPept) a structurally equivalent text ASN.1 x structurally equivalent XML c cache components -h Display extra Help message -i filename Input file name (standard input by default) -k Enable local fetching -l Lock components in advance -n policy Near FASTA policy: a All n Near only (default) f Far only -o filename Nucleotide Output file name -p path Path to files -r Enable Remote fetching -v filename Protein output file name -x ext File selection suffix when working with entire directories. (default is .aso) EXAMPLES
The command asn2all -i gbpri1.aso -a t -b -f g -o gbpri1.nuc -v gbpri1.prt will generate GenBank and GenPept reports from gbpri1.aso. AUTHOR
The National Center for Biotechnology Information. SEE ALSO
asn2asn(1), asn2ff(1), asn2fsa(1), asn2gb(1), asn2idx(1), asn2xml(1), asndhuff(1), gene2xml(1), gunzip(1). NCBI
2012-06-24 ASN2ALL(1)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy