Hello.
Looking for a method of modularizing my bash script, I am stuck with such a problem. For example, I have:
MODULE_NAME="test"
FUNCTION_NAME="run"
How do I can a function with name test_run? (4 Replies)
I'm trying to write a simple script that takes all the .tar.gz files in a directory and verifies them by using the gzip -tv command:
for zip in *.tar.gz
do
gzip -tv $zip
if ; then #Check return code from tar
echo "File ${zip} verified OK."
exit... (4 Replies)
I am trying to create a shell that asks the user to enter their name, and compare it to my own by saying we have the same name or saying my name and that they have a nice name too. Here is my script...
#!/bin/bash-x
echo "Enter your name".
read name
if
then
echo "My name is Adam too"... (1 Reply)
Hi All,
I am getting a syntax error message while trying to compare 2 files using the compare function (LINUX)
command substitution: line 79: syntax error near unexpected token `('
command substitution: line 79: `cmp -s <(tr , \n < $COMMON_TMP/nt_per_gs.done | sort) <(tr , \n <... (5 Replies)
hi all ,
i just tried to take the status of previous command inside the script using
echo $?. It throws me a variable syntax error , but when i use echo $? as an individual command it works perfectly .
can anyone Please tell me why am getting a variable syntax error when i use echo $?... (7 Replies)
Hi,
I'm a Delphi developer new to linux, new to this forums and new to BASH programming and got a new task in my work: maintaining an existing set of BASH scripts. First thing I want to do is making the code more reliable as in my opinion it's really bad written. So here's the quest:
I'm... (6 Replies)
Needing a hint. Creating that function called Meter my simple script works well. What I want now is to start the last four commented lines to include or trigger a reaction, if there are more than n lines in that .txt-file it shall display that message for example. But the interpreter says there is... (3 Replies)
I am sharing a code snippet.
for (( i=0; i<=$(( $count -1 )); i++ ))
do
first=${barr2}
search=${barr1}
echo $first
echo "loop begins"
for (( j=0; j<=5000; j++ ))
do
if } == $search ]]; then
echo $j
break;
fi
done
second=${harr2}
echo $second (2 Replies)
Discussion started by: ngabrani
2 Replies
LEARN ABOUT SUSE
tk_nameofcapstyle
Tk_GetCapStyle(3) Tk Library Procedures Tk_GetCapStyle(3)__________________________________________________________________________________________________________________________________________________NAME
Tk_GetCapStyle, Tk_NameOfCapStyle - translate between strings and cap styles
SYNOPSIS
#include <tk.h>
int
Tk_GetCapStyle(interp, string, capPtr)
const char *
Tk_NameOfCapStyle(cap)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting.
const char *string (in) String containing name of cap style: one of "butt", "projecting", or "round".
int *capPtr (out) Pointer to location in which to store X cap style corresponding to string.
int cap (in) Cap style: one of CapButt, CapProjecting, or CapRound.
_________________________________________________________________DESCRIPTION
Tk_GetCapStyle places in *capPtr the X cap style corresponding to string. This will be one of the values CapButt, CapProjecting, or
CapRound. Cap styles are typically used in X graphics contexts to indicate how the end-points of lines should be capped. See the X docu-
mentation for information on what each style implies.
Under normal circumstances the return value is TCL_OK and interp is unused. If string does not contain a valid cap style or an abbrevia-
tion of one of these names, then an error message is stored in interp->result, TCL_ERROR is returned, and *capPtr is unmodified.
Tk_NameOfCapStyle is the logical inverse of Tk_GetCapStyle. Given a cap style such as CapButt it returns a statically-allocated string
corresponding to cap. If cap is not a legal cap style, then "unknown cap style" is returned.
KEYWORDS
butt, cap style, projecting, round
TkTk_GetCapStyle(3)