I am new to unix and need to learn how to compare a variable $subject to a string pattern. If the variable has the word "Item" in it then it should be true. How do I do this? Currently I am using the Bourne shell but I can also use Korn or Bash.
I come from a Rexx background where strings are... (2 Replies)
dear all
i had two variable in my script.
var1 and var2
var1= 10 ( it will part of date op ) Fri Aug 8 10:05:09 IST 2008
var2=9 ( it will op of ls -ltr and time part of it.)
now i want to compare of them and want to do some task if both are are not same.
kindly let me know possible... (0 Replies)
one.txt
ONS.1287677000.820.log 20Oct2010
ONS.1287677000.123.log 21Oct2010
ONS.1287677000.456.log 22Oct2010
two.txt
ONS.1287677000.820.log:V AC CC EN
ONS.1287677000.123.log:V AC CC EN
ONS.1287677000.820.log:V AC CC EN
In file two.txt
i have to look for pattern which column one... (17 Replies)
Hello All,
I am running the below code in my script. I want if jk is empty nothing should be appened to the file total_usage.
but apparently its not happening.Kindy let me know how to do it.
###################################
jk=`ps auxf |grep -w $inputline|tr -s " "|cut -d... (0 Replies)
Please help me with this:
I need to compare two values in if condition in shell script but its goes always to else condition:
TIME_CHECK=PM
TIME-CLOCK=PM
if ; then
echo "You have access!"
else
echo "ACCESS DENIED!"
fi (5 Replies)
Here in the input file
23:59:13,devicename,21,server1,700
23:59:13,devicename,22,server2,200
23:59:13,devicename,23,server3,200
23:59:13,devicename,24,server4,200
23:59:13,devicename,25,server5,200
23:59:13,devicename,26,server6,200
23:59:13,devicename,27,server7,200... (6 Replies)
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......qrt: ....
.......xyz: abz: ......qrt: ...
I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
I have an application(Minecraft Server) that generates a logfile live. Using Crontab and screen I send a 'list' command every minute.
Sample Log view:
2013-06-07 19:14:37 <Willrocksyea1> hello*
2013-06-07 19:14:41 <Gromden29> hey
2013-06-07 19:14:42 Gromden29 lost connection:... (1 Reply)
I have two files say FILE1 and FILE2.
FILE1 contains 80,000 filename in sorted order and another file FILE2 contains 6,000 filenames is also in sorted order.
I want to compare the filename for each file and copy them in to a folder when filename is matched.
File1.txt contain 80,000... (8 Replies)
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Discussion started by: Soham
21 Replies
LEARN ABOUT MOJAVE
dump
dump(n) dump(n)
__________________________________________________________________________________________________________________________________________________NAME
dump - Dump information about Tcl interpreter in TkCon
SYNOPSIS
dump method ?-nocomplain? ?-filter pattern? ?--? pattern ?pattern ...?
_________________________________________________________________DESCRIPTION
The dump command provides a way for the user to spit out state information about the interpreter in a Tcl readable (and human readable)
form. It takes the general form:
dump method ?-nocomplain? ?-filter pattern? ?--? pattern ?pattern ...?
The patterns represent glob-style patterns (as in string match pattern $str). -nocomplain will prevent dump from throwing an error if no
items matched the pattern. -filter is interpreted as appropriate for the method. The various methods are:
dump command args
Outputs one or more commands.
dump procedure args
Outputs one or more procs in sourceable form.
dump variable args
Outputs the values of variables in sourceable form. Recognizes nested arrays. The -filter pattern is used as to filter array ele-
ment names and is interepreted as a glob pattern (defaults to {*}). It is passed down for nested arrays.
dump widget args
Outputs one or more widgets by giving their configuration options. The -filter pattern is used as to filter the config options and
is interpreted as a case insensitive regexp pattern (defaults to {.*}).
SEE ALSO
idebug(n), observe(n), tkcon(1), tkcon(n), tkconrc(5)KEYWORDS
Tk, console, dump
COPYRIGHT
Copyright (c) Jeffrey Hobbs <jeff at hobbs.org>
TkCon 2.5 dump(n)