Here it wont terminate unless i take the not of my statement
#!/bin/bash
grabXML
parseXML
TAIL=5
#"$(cat dailyCasLog | tail -n 1)"
COUNT=200
LINE=5
#"$(cat dailyCasLog | head -n $COUNT | tail -n 1)"
echo $TAIL
echo $LINE
while ($LINE!=)
do
#$LINE">>currentLine
folderMaker
... (0 Replies)
Hi there,
I have written a script to clear out log files from the var/tmp dir. It works up to a point. What I needed to do was to exit the script if there was no files to be deleted. I can get this working on a test script but when I implement it into my program it errors out with a `then` not... (3 Replies)
I have a problem validating my script. The start of my script begins like this:
then after this i have all of my script and functions.
at the end i close the loop with this code:
What i want to know is, how do i make the loop so that only Yes or no can be an answer?
and if... (7 Replies)
Hi guys,
I'm trying to loop through a number of files that is set by whatever is in a field.
eg.
The idea is to split FILELIST down into fields, it could contain 1 - 999 fields and it's bar delimited.
I thought simple, count the number of fields in the field and then loop... (1 Reply)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
good afternoon forums.
i have a problem that ive been trying to work out all morning and cant seem to get my head around it.
what i have in my script is individual letters saved in different variables. so if the word unix was saved then 'u' would be stored in the variable 'wvar1' 'n' in 'wvar2'... (7 Replies)
for i in `seq 1 10 ` ; do
printf $i '\n';
done
gives me this:
1234567891064mbarch ~ $ (output followed by bash prompt) :(
I've tried so many ways to create a newline at the end. Does anyone have any ideas.. Thanks in advance. Sorry (7 Replies)
I have a script that loops through a list of users to list files owned by these users
for u is `cat users.list`
do
echo $u >> result.out
find /home -user $u >> result.out
find /var -user $u >> result.out
find /opt -user $u >> result.out
find /usr -user $u >> result.out
done
an so... (3 Replies)
Very new to the Korn Shell, but I've been looking up loops online and it seems this should work. I'm just trying to convert an ip range in variables $A and $B and iterate the individual ip's out to new lines. Unfortunately I get {152..155} instead of 152, 153, 154, and 155.
# for i in {$A..$B};... (8 Replies)
Discussion started by: Azrael
8 Replies
LEARN ABOUT OSF1
line
line(1) General Commands Manual line(1)NAME
line - Reads one line from standard input
SYNOPSIS
line
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
line: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
DESCRIPTION
The line command copies one line, up to and including a newline, from standard input and writes it to standard output. Use this command
within a shell command file to read from your terminal. The line command always writes at least a newline character.
NOTES
The line utility has no internationalization features and is marked LEGACY in XCU Issue 5. Use the read utility instead.
EXIT STATUS
Success. End-of-File.
EXAMPLES
To read a line from the keyboard and append it to a file, enter: echo 'Enter comments for the log:' echo ': c' line >>log
This shell procedure displays the message: Enter comments for the log:
It then reads a line of text from the keyboard and adds it to the end of the file log. The echo ': c' command displays a : (colon)
prompt. See the echo command for information about the c escape sequence.
SEE ALSO
Commands: echo(1), ksh(1), read(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: read(2)
Standards: standards(5)line(1)