Sponsored Content
Full Discussion: Bash while read line
Top Forums Shell Programming and Scripting Bash while read line Post 302910491 by chrisjorg on Thursday 24th of July 2014 08:09:05 PM
Old 07-24-2014
First line in file "file" is PA2_2_f1010 so it is echoing correctly.


What VMD wants is the value of a variable $line which contains the first line of the file "file", namely PA2_2_f1010..

but I tried running with $line and just line, no difference.


Code:
[user]$ ./batch_vmdgenpqr.sh 
line: PA2_2_f1010
Info) VMD for LINUXAMD64, version 1.9.1 (February 1, 2012)
Info) http://www.ks.uiuc.edu/Research/vmd/                         
Info) Email questions and bug reports to vmd@ks.uiuc.edu           
Info) Please include this reference in published work using VMD:   
Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual   
Info)    Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
Info) -------------------------------------------------------------
Info) Multithreading available, 32 CPUs detected.
Info) Free system memory: 111420MB (86%)
Info) Creating CUDA device pool and initializing hardware...
CUDA error: invalid device symbol, CUDAClearDevice.cu line 62
Info) Detected 1 available CUDA accelerator:
Info) [0] Quadro K5000        8 SM_3.0 @ 0.71 GHz, 4.0GB RAM, KTO, OIO, ZCP
Info) Dynamically loaded 2 plugins in directory:
Info) /opt/vmd-1.9.1/plugins/LINUXAMD64/molfile
can't read "line": no such variable
Info) VMD for LINUXAMD64, version 1.9.1 (February 1, 2012)
Info) Exiting normally.
invalid command name "PA2_2_f1043"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to read the value from a specific line and column BASH

Hi All, I have the same problem as the one posted in https://www.unix.com/shell-programming-scripting/96097-how-read-value-specific-line-column-csh-variable.html but I'm using bash. Can anyone tell me how I have to modify the code to make it bash compatible? eval `awk 'NR==3{print "set... (5 Replies)
Discussion started by: f_o_555
5 Replies

2. Shell Programming and Scripting

bash: read file line by line (lines have '\0') - not full line has read???

I am using the while-loop to read a file. The file has lines with null-terminated strings (words, actually.) What I have by that reading - just a first word up to '\0'! I need to have whole string up to 'new line' - (LF, 10#10, 16#A) What I am doing wrong? #make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies

3. Shell Programming and Scripting

BASH: Break line, read, break again, read again...

...when the lines use both a colon and commas to separate the parts you want read as information. The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

4. Shell Programming and Scripting

speeding up bash script with "while read line"

Hello everybody, I'm still slowly treading my way into bash scripting (without any prior programming experience) and hence my code is mostly what some might call "creative" if they meant well :D I have created a script that serves its purpose but it does so very slowly, since it needs to work... (4 Replies)
Discussion started by: origamisven
4 Replies

5. Shell Programming and Scripting

Help with Bash piped while-read and a read user input at the same time

Hi I am new to writing script and want to use a Bash Piped while-read and read from user input. if something happens on server.log then do while loop or if something happend on user input then do while loop. Pseudocode something like: tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies

6. Shell Programming and Scripting

Bash script to read a file from particular line till required line and process

Hi All, Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool. Wraper script am trying is to do with above metion 2 files. utility tool accepts : a. userinfo file : which contains username b. item file : which... (2 Replies)
Discussion started by: Optimus81
2 Replies

7. Shell Programming and Scripting

[BASH] read 'line' issue with leading tabs and virtual line breaks

Heyas I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter). The typewriter-part is a 'bonus' but still has its own flaws, but thats for later. So in some way, i'm trying to rewrite cat using bash and other commands. But sadly it fails on... (2 Replies)
Discussion started by: sea
2 Replies

8. UNIX for Advanced & Expert Users

[BASH] Read value of variable, but not comment on the same line

Heyas So while i'm trying to increase security/usability of my TUI commands, i'm currently at tui-conf-get. There was also a bug, i wanted to fix, but sadly that bugfix is more insecure - but twice as fast as my current buggy method. I've added a getopts toggle, '-s' to toggle beSecure,... (8 Replies)
Discussion started by: sea
8 Replies

9. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

10. Shell Programming and Scripting

Read line from serial device with BASH

I'm new to Linux (Ubuntu 16.04), and very new to BASH scripting. I have a Numato 8-channel USB GPIO device, which is a DAQ that appears in the system as a serial port. In Linux it appears as ttyACM0. I can easily manipulate a GPO with, for example: echo "gpio set 7" > /dev/ttyACM0 ...followed... (12 Replies)
Discussion started by: Chalk-X
12 Replies
Info::Layer3::Netscreen(3pm)				User Contributed Perl Documentation			      Info::Layer3::Netscreen(3pm)

NAME
SNMP::Info::Layer3::Netscreen - SNMP Interface to Juniper Netscreen Devices AUTHOR
Kent Hamilton SYNOPSIS
#Let SNMP::Info determine the correct subclass for you. my $netscreen = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $netscreen->class(); print "SNMP::Info determined this device to fall under subclass : $class "; DESCRIPTION
Provides abstraction to the configuration information obtainable from a Netscreen device through SNMP. See inherited classes' documentation for inherited methods. my $netscreen = new SNMP::Info::Layer3::Netscreen(...); Inherited Classes SNMP::Info::Layer3 Required MIBs NETSCREEN-SMI NETSCREEN-PRODUCTS-MIB NETSCREEN-INTERFACE-MIB NETSCREEN-SET-GEN-MIB Inherited Classes See "Required MIBs" in SNMP::Info::Layer3 and its inherited classes. GLOBALS
These are methods that return scalar value from SNMP $netscreen->vendor() Returns 'netscreen' $netscreen->os() Returns 'screenos' $netscreen->os_ver() Extracts the OS version from the description string. $netscreen->serial() Returns serial number.. Overrides $netscreen->layers() Returns 01001100. Device doesn't report layers properly, modified to reflect Layer3 functionality. Globals imported from SNMP::Info::Layer3 See "GLOBALS" in SNMP::Info::Layer3 for details. TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash. Table Methods imported from SNMP::Info::Layer3 See "TABLE METHODS" in SNMP::Info::Layer3 for details. perl v5.12.4 2011-09-28 Info::Layer3::Netscreen(3pm)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy