Tcl and clear case to obtain a file name as variable
this is a script in tcl with clearcase view
the above code gives the output as
but the required output is "R7.1.1" without quotes
can anyone please let me know how do we obtain this.
and also pls help to refine the script to be very simple and short
thanks in advance
---------- Post updated at 11:57 AM ---------- Previous update was at 10:52 AM ----------
I can use join to make the output as R7.11
but i need R7.1.1
and an optimized code.. some one pls help
---------- Post updated at 03:39 PM ---------- Previous update was at 11:57 AM ----------
first i have pre-define some variable, then input those into a for statement for some process, finally, i want to get a new value out of it.
A=192.168.16.1
B=192.168.32.1
C=192.168.64.1
for i in A B C
do
echo $i | nawk -F. '{ if ($3 > 16 and < 32) ....something like that, then ( $i=... (7 Replies)
Friends,
I was asked to work on Clear Case after setting up.
For this created a dynamic view by using the command, 'cleartool mkview -tag <view name> -stgloc viewstg'.
Now I am not sure how to proceed further :-( May I request you to help me out in continuing further. I have a deadline in... (1 Reply)
Hi,
having two csv files, both sorted, by key (column1), f1 containing duplicate keys and f2 containing no duplicate keys, how can I obtain all rows from f1 with the keys listed in file2? Example:
f1 is:
k1,gsj01fd
k2,vi982cj
k2,1fjk01e
k3,81kjfds
k4,sd9dasi
f2 is:
k2
k3
and I... (3 Replies)
Hello. I should have asked this awhile ago but here is my situation. My task is to generate LOC for different directories. I have a text file that has dates in this format (01-Aug-2006). My task is to read each line and compare it to a branch date. Depending on the date, it should generate a... (0 Replies)
Hi, I have a variable $Ctrcd which contains country names in upper case and i want to convert them into lower case. I have tried so many solutions from already existing threads but couldn't get the correct one.
Can anybody help me with this.....
Thanks a lot.. (2 Replies)
Hi ,
I am having one TCL TK script , I am setting some variables in the GUI TK interface
set DI 1
set MODELS_PATH /a/d/path
but I want to make ksh shell understand the variables when I am running TK script
I tried to do like this
set a
but it is not working
... (1 Reply)
Hi,
I have a scenario in which I have to substitute the variable to call the procedure "login" in Tcl.
for {set i 1} {$i<=2} {incr i} {
login "$spawn_id$i"
}
I have the variables $spawn_id1 and $spawn_id2 in the beginning of the script which I'm trying to pass to the procedure "login". So... (2 Replies)
Anyone knows how to set variable in TCL ?
let say i have a password variable and it will have different values.
set variable
and variable has different values like:
xxxx
yyyy
zzzz (0 Replies)
Hello Expert,
I have a file in the following format:
SYNTAX_VERSION 5
MONITOR "NAME_TEMPLATES"
DESCRIPTION "Monitors for contents of error "
INTERVAL "1m"
MONPROG "script.sh NAME_TEMPLATES"
MAXTHRESHOLD
GEN_BELOW_RESET
SEVERITY Major
... (17 Replies)
#!/usr/bin/bash
sub1 () {
for ((i=0;i<10;i++))
do
export a=$i;
echo "value of a is $a";
sleep 1
done
}
sub1 &
sub2 () {
for ((j=0;j<10;j++))
do
echo "value of a is $a";
sleep 1
done
} (5 Replies)
Discussion started by: Arun_Linux
5 Replies
LEARN ABOUT SUNOS
fputs
puts(3C) Standard C Library Functions puts(3C)NAME
puts, fputs - put a string on a stream
SYNOPSIS
#include <stdio.h>
int puts(const char *s);
int fputs(const char *s, FILE *stream);
DESCRIPTION
The puts() function writes the string pointed to by s, followed by a NEWLINE character, to the standard output stream stdout (see
intro(3)). The terminating null byte is not written.
The fputs() function writes the null-terminated string pointed to by s to the named output stream. The terminating null byte is not writ-
ten.
The st_ctime and st_mtime fields of the file will be marked for update between the successful execution of fputs() and the next successful
completion of a call to fflush(3C) or fclose(3C) on the same stream or a call to exit(2) or abort(3C).
RETURN VALUES
On successful completion, both functions return the number of bytes written; otherwise they return EOF and set errno to indicate the error.
ERRORS
Refer to fputc(3C).
USAGE
Unlike puts(), the fputs() function does not write a NEWLINE character at the end of the string.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO exit(2), write(2), intro(3), abort(3C), fclose(3C), ferror(3C), fflush(3C), fopen(3C), fputc(3C), printf(3C), stdio(3C), attributes(5),
standards(5)SunOS 5.10 18 Jun 2003 puts(3C)