Hi y'all...I've been wracking my brain over this very simple script that reads in a textfile and echos each line. But I keep getting an error.
Below is my script:
#!/bin/bash
while read myline
do
echo $myline
done < t_file-20080221.01.asc
The error I am getting is:
syntax error... (1 Reply)
Can someone please give me a big help?
I'm trying to read the file below, which have the format:
query,XX,XX,6559,0.132,0.210,0.108,0.03%
query,XX,XX,6559,0.132,0.210,0.108,0.03%
query,XX,XX,6559,0.132,0.210,0.108,0.03%
Need to get the 4th value: 6559 and sum all and put it into a var:
... (2 Replies)
Hi all,
Actually I have a huge bash file like:
port1=$PORT && if ; then .....
....stuff
port2=$PORT && if ; then .....
...stuff
port3=$PORT && if ; then .....
...stuff
port4=$PORT && if ; then .....
...stuff
port5=$PORT && if ; then .....
I would like to change the $port inside... (2 Replies)
Hi All,
Can someone help steer me to the simplest approach to write a script that reads the second column of a csv file and returns the highest value.
example file:
DATE,QUANTITY
Mon Apr 30 01:56:00 2012,42
Mon Apr 30 02:24:00 2012,72
Mon Apr 30 02:56:00 2012,102
Mon Apr 30 02:59:00... (3 Replies)
I am very new to all these programming languages and really love Linux but have only begun to dive into bash scripting... I am curious what's going on with this script...
#!/bin/bash
if ; then
# xen
grep control_d /proc/xen/capabilities >& /dev/null
if ; then
# domU -- do not run on... (2 Replies)
Hi All,
How I can read on variable with cycle for in bash script e.g.#!/bin/bash
VAR1=`command1 sentence list`
for i in $(cat $VAR1);
do
VAR2=`command2 $i`
echo $VAR2
doneSo read VAR1 execute command over this and load in VAR2 then print VAR2,
Thanks you,
Please wrap... (1 Reply)
Hi All,
Please let me know how to read space between 2 words in script. It is reading only first chars ES,NZ. But after space it is not reading next 3 chars.
ES LPI
NZ GBL
FR LPI
DK LPI
for v_sob_cntry_cd in `cat /shared/set_of_books_cntry_cd_list.lst`
do
... (6 Replies)