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)
Hello everyone,
I am struggling a bit with a batch script that I need to run in cygwin. I work in winXP and I had to write some awk scripts to do some file manipulation, and now I would like to automate the process by just running a batch file so that my colleagues can use it easily.
Now, the... (2 Replies)
...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)
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)
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,
I am facing issues with the below:
I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,).
Now i want to read this command from file and execute it.
So my code below is :
Contents in the lookup.lkp file is :
c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
I have a script batch_vmdgenpqr.sh which has a problem:
#!/bin/bash
while read line
do
vmd.sh -dispdev text -e vmdgenpqr.tcl -args $line
done<file
The do line calls another program, VMD (called by vmd.sh) and it requires the values from $line, but this is not recognised by... (3 Replies)
Hi.
How can I create a history function? (By "read" command or so)
&
How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A)
Thanks in advance. (4 Replies)
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
I have this simple code to stop script execution.
I did not invent it, and it works.
It used to have fackEnterKey as option, but it works without it.
My curiosity question is -
the "function " terminates when "enter" key is pressed and only "enter" key.
I did read the man and... (5 Replies)