Sponsored Content
Top Forums Shell Programming and Scripting Field Number read and "wc -l" Post 302813451 by kekanap on Monday 27th of May 2013 10:37:35 AM
Old 05-27-2013
Hallo Arun

i tried i get a syntax error

{ print $0 ; ++cpt } END { print cpt} == are we supposed to have spaces there?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to request a "read" or "delivered" receipt for mails

Dears, I've written a script which allows me to send mails in different formats with different attaches. Now I still want to add a feature to this script. My users would like to be able to receive a "read" or "delivered" receipt for their mails. The script send mails on behalve of an specific... (1 Reply)
Discussion started by: plelie2
1 Replies

2. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

3. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Purpose of "read" and "$END$" in ksh ?

Hi, Could anyone please shed some light on the following script lines and what is it doing as it was written by an ex-administrator? cat $AMS/version|read a b verno d DBVer=$(/usr/bin/printf "%7s" $verno) I checked that the cat $AMS/version command returns following output: ... (10 Replies)
Discussion started by: dbadmin100
10 Replies

6. Shell Programming and Scripting

Read from "list1" and list matches in "list2"

I want to print any matching IP addresse in List1 with List 2; List 1 List of IP addresses; 161.85.58.210 250.57.15.129 217.23.162.249 74.76.129.101 30.221.177.237 3.147.200.59 170.58.142.64 127.65.109.33 150.167.242.146 223.3.20.186 25.181.180.99 2.55.199.32 (3 Replies)
Discussion started by: lewk
3 Replies

7. UNIX for Advanced & Expert Users

Should I say "field 8" or "column 8" in this case?

I saw some recent posts where I thought the terms "field" and "column" were being misused. I work with data a lot, and have my opinions. I'm wondering if those opinions are correct. ***** Rows seem clear - I don't think there is any controversy about what a row is, either for database or text... (10 Replies)
Discussion started by: hanson44
10 Replies

8. Shell Programming and Scripting

Awk,sed : change every 2nd field ":" to "|"

Hi Experts, I have a string with colon delimited, want 2nd colon to be changed to a pipe. data: 101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3: I am trying with sed, but can change only 1 occurance: echo "101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:" | sed 's/:/|/2'... (5 Replies)
Discussion started by: rveri
5 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
g_anaeig(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c				       g_anaeig(1)

NAME
g_anaeig - analyzes the eigenvectors VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
g_anaeig -v eigenvec.trr -v2 eigenvec2.trr -f traj.xtc -s topol.tpr -n index.ndx -eig eigenval.xvg -eig2 eigenval2.xvg -comp eigcomp.xvg -rmsf eigrmsf.xvg -proj proj.xvg -2d 2dproj.xvg -3d 3dproj.pdb -filt filtered.xtc -extr extreme.pdb -over overlap.xvg -inpr inprod.xpm -[no]h -[no]version -nice int -b time -e time -dt time -tu enum -[no]w -xvg enum -first int -last int -skip int -max real -nframes int -[no]split -[no]entropy -temp real -nevskip int DESCRIPTION
g_anaeig analyzes eigenvectors. The eigenvectors can be of a covariance matrix ( g_covar) or of a Normal Modes analysis ( g_nmeig). When a trajectory is projected on eigenvectors, all structures are fitted to the structure in the eigenvector file, if present, otherwise to the structure in the structure file. When no run input file is supplied, periodicity will not be taken into account. Most analyses are performed on eigenvectors -first to -last, but when -first is set to -1 you will be prompted for a selection. -comp: plot the vector components per atom of eigenvectors -first to -last. -rmsf: plot the RMS fluctuation per atom of eigenvectors -first to -last (requires -eig). -proj: calculate projections of a trajectory on eigenvectors -first to -last. The projections of a trajectory on the eigenvectors of its covariance matrix are called principal components (pc's). It is often useful to check the cosine content of the pc's, since the pc's of random diffusion are cosines with the number of periods equal to half the pc index. The cosine content of the pc's can be calculated with the program g_analyze. -2d: calculate a 2d projection of a trajectory on eigenvectors -first and -last. -3d: calculate a 3d projection of a trajectory on the first three selected eigenvectors. -filt: filter the trajectory to show only the motion along eigenvectors -first to -last. -extr: calculate the two extreme projections along a trajectory on the average structure and interpolate -nframes frames between them, or set your own extremes with -max. The eigenvector -first will be written unless -first and -last have been set explicitly, in which case all eigenvectors will be written to separate files. Chain identifiers will be added when writing a .pdb file with two or three structures (you can use rasmol -nmrpdb to view such a .pdb file). Overlap calculations between covariance analysis: Note: the analysis should use the same fitting structure -over: calculate the subspace overlap of the eigenvectors in file -v2 with eigenvectors -first to -last in file -v. -inpr: calculate a matrix of inner-products between eigenvectors in files -v and -v2. All eigenvectors of both files will be used unless -first and -last have been set explicitly. When -v, -eig, -v2 and -eig2 are given, a single number for the overlap between the covariance matrices is generated. The formulas are: difference = sqrt(tr((sqrt(M1) - sqrt(M2))2)) normalized overlap = 1 - difference/sqrt(tr(M1) + tr(M2)) shape overlap = 1 - sqrt(tr((sqrt(M1/tr(M1)) - sqrt(M2/tr(M2)))2)) where M1 and M2 are the two covariance matrices and tr is the trace of a matrix. The numbers are proportional to the overlap of the square root of the fluctuations. The normalized overlap is the most useful number, it is 1 for identical matrices and 0 when the sampled subspaces are orthogonal. When the -entropy flag is given an entropy estimate will be computed based on the Quasiharmonic approach and based on Schlitter's formula. FILES
-v eigenvec.trr Input Full precision trajectory: trr trj cpt -v2 eigenvec2.trr Input, Opt. Full precision trajectory: trr trj cpt -f traj.xtc Input, Opt. Trajectory: xtc trr trj gro g96 pdb cpt -s topol.tpr Input, Opt. Structure+mass(db): tpr tpb tpa gro g96 pdb -n index.ndx Input, Opt. Index file -eig eigenval.xvg Input, Opt. xvgr/xmgr file -eig2 eigenval2.xvg Input, Opt. xvgr/xmgr file -comp eigcomp.xvg Output, Opt. xvgr/xmgr file -rmsf eigrmsf.xvg Output, Opt. xvgr/xmgr file -proj proj.xvg Output, Opt. xvgr/xmgr file -2d 2dproj.xvg Output, Opt. xvgr/xmgr file -3d 3dproj.pdb Output, Opt. Structure file: gro g96 pdb etc. -filt filtered.xtc Output, Opt. Trajectory: xtc trr trj gro g96 pdb cpt -extr extreme.pdb Output, Opt. Trajectory: xtc trr trj gro g96 pdb cpt -over overlap.xvg Output, Opt. xvgr/xmgr file -inpr inprod.xpm Output, Opt. X PixMap compatible matrix file OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 19 Set the nicelevel -b time 0 First frame (ps) to read from trajectory -e time 0 Last frame (ps) to read from trajectory -dt time 0 Only use frame when t MOD dt = first time (ps) -tu enum ps Time unit: fs, ps, ns, us, ms or s -[no]wno View output .xvg, .xpm, .eps and .pdb files -xvg enum xmgrace xvg plot formatting: xmgrace, xmgr or none -first int 1 First eigenvector for analysis (-1 is select) -last int 8 Last eigenvector for analysis (-1 is till the last) -skip int 1 Only analyse every nr-th frame -max real 0 Maximum for projection of the eigenvector on the average structure, max=0 gives the extremes -nframes int 2 Number of frames for the extremes output -[no]splitno Split eigenvector projections where time is zero -[no]entropyno Compute entropy according to the Quasiharmonic formula or Schlitter's method. -temp real 298.15 Temperature for entropy calculations -nevskip int 6 Number of eigenvalues to skip when computing the entropy due to the quasi harmonic approximation. When you do a rotational and/or transla- tional fit prior to the covariance analysis, you get 3 or 6 eigenvalues that are very close to zero, and which should not be taken into account when computing the entropy. SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 g_anaeig(1)
All times are GMT -4. The time now is 11:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy