05-05-2019
That depends on how you present the values - in a file? in a variable? echoing a constant? Mayhap you just subtract one?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies
2. Programming
Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies
3. Shell Programming and Scripting
Hi...
I have a requrement to compare two files.
for e.g.
File 1
2007/08/19 09:48:10 DH-032 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-045 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-043 $APTA1: Device AATD8029
File 2
2007-08-19 09:48:10 DH-032... (1 Reply)
Discussion started by: evvander
1 Replies
4. UNIX for Dummies Questions & Answers
Hi Friends,
How to check a variable value is either charecter or number?
With Regards / Ganapati (1 Reply)
Discussion started by: ganapati
1 Replies
5. Shell Programming and Scripting
script outputting cant find anything wrong with the script either... :
#!/bin/sh
#count execution script
time=0
while
do
if
then
time=`expr $time + 1`
if
then
echo "The current tick is 100"
fi
fi (2 Replies)
Discussion started by: aspect_p
2 Replies
6. Shell Programming and Scripting
hi all here is a very simple question.. i want to count the number of columns using awk..my file looks like this:
1,2
1,2
1,2
1,2
1,2
1,2
1,2
1,2
i want to count number of columns and i so far i have:
awk 'BEGIN {IFS=","} END {print NF}' data > data1
i am getting 1... (3 Replies)
Discussion started by: npatwardhan
3 Replies
7. Shell Programming and Scripting
Hello,
I am new to shell scripting and I need your help.
I have found similar scripts in the forum but I need further assistance.
I am building a script to use hourly in cron to mailx me if the number of files in a path is less than e.g 100
I have started with the following:
#!/bin/sh... (2 Replies)
Discussion started by: drbiloukos
2 Replies
8. Red Hat
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
9. Shell Programming and Scripting
I am trying to remove lines in a variable(nidlist) that exceed a certain charecter count(in this case 7).
I am trying to incorparate the function that removes the lines that exceed 7 into this piece of code
nidlist=$(print $nidlist |tr ';' '\n' | sort | uniq | tr '\n' ';')
Thank... (4 Replies)
Discussion started by: ajetangay
4 Replies
10. Programming
So my program is not working and I keep changing it to figure out why. So I have two questions, can I do tracing similar to bash, and also what is wrong with this.
The idea is simple, I want to count "word" lengths, with the loose definition of word not being a space, tab, or newline. Here is... (11 Replies)
Discussion started by: Riker1204
11 Replies
queue(n) Tcl Data Structures queue(n)
NAME
queue - Create and manipulate queue objects
SYNOPSIS
package require Tcl 8.2
package require struct ?1.2.1?
queueName option ?arg arg ...?
queueName clear
queueName destroy
queueName get ?count?
queueName peek ?count?
queueName put item ?item ...?
queueName size
DESCRIPTION
The ::struct::queue command creates a new queue object with an associated global Tcl command whose name is queueName. This command may be
used to invoke various operations on the queue. It has the following general form:
queueName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for queue objects:
queueName clear
Remove all items from the queue.
queueName destroy
Destroy the queue, including its storage space and associated command.
queueName get ?count?
Return the front count items of the queue and remove them from the queue. If count is not specified, it defaults to 1. If count is
1, the result is a simple string; otherwise, it is a list. If specified, count must be greater than or equal to 1. If there are no
items in the queue, this command will return count empty strings.
queueName peek ?count?
Return the front count items of the queue, without removing them from the queue. If count is not specified, it defaults to 1. If
count is 1, the result is a simple string; otherwise, it is a list. If specified, count must be greater than or equal to 1. If
there are no items in the queue, this command will return count empty strings.
queueName put item ?item ...?
Put the item or items specified into the queue. If more than one item is given, they will be added in the order they are listed.
queueName size
Return the number of items in the queue.
KEYWORDS
stack, matrix, tree, graph
struct 1.2.1 queue(n)