Hi,
I need to check for value not equal (<>) to 21 and not equal empty or null values.
Please modify this script
if
then
echo "$VALUE,$BSC_NAME,$BSC_ID" > $OUT_FILE/power_up.out
end if
TQ (5 Replies)
Hello All,
I have written shell script whcih at the max 3 parameters.
When only one commandline argument and other two command line arguments are passed as empty string like
eg : archive ' ' ' '
Then i need to check whether the commandline... (12 Replies)
Hi All,
I am new to unix worldd .
I need to check a file1 if its empty or not.
If its empty then return a non zero value say 99
could you pls let me know the perl script for this. (2 Replies)
Hi one to All
i have written the code for searching the string in the file for specified path. its working fine,
but my req:if the string is not available in the file , it should display the Message saying that , string is not available in the file.
code is:
echo "give the path where... (12 Replies)
hi,
when i am doing the following things getting error
Can anyone please suggest
i have a file where there is a line like the following
branch=dev sdf dev jin kilii fin kale boyle dev james dev
i want to search the existance of dev in the above line.
cat "$file" | sed -n... (8 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I am reading from a file and executing the jobs with/without parameters as the job requires.
File
job1 R
job2
job3 Y 123
if
then
<job>.ksh
else
<job>.ksh $params
fi
This works fine if the line read from the file has parameters
it executes like job1.ksh R
But for... (2 Replies)
Hi,
I have a shell script where I am trying to unzip bunch of files zip files one by one. But out of many zip files, if any one zip file is empty, the unzip command sends a non-zero return code and fails the script.
I am trying to see if I can get a success error code even if the script... (2 Replies)
Hello
So i have that script collection, in which i have a single script to create a configuration file.
In there, i have multiple occourences of something like this:
prj_title=$(tui-read "What is the TITLE? ($prj_name):")
] && prj_title="${prj_name/_/ }"
They all work as expected, if... (5 Replies)
Discussion started by: sea
5 Replies
LEARN ABOUT MOJAVE
textutil_split
textutil::split(n) Text and string utilities, macro processing textutil::split(n)
__________________________________________________________________________________________________________________________________________________NAME
textutil::split - Procedures to split texts
SYNOPSIS
package require Tcl 8.2
package require textutil::split ?0.7?
::textutil::split::splitn string ?len?
::textutil::split::splitx string ?regexp?
_________________________________________________________________DESCRIPTION
The package textutil::split provides commands that split strings by size and arbitrary regular expressions.
The complete set of procedures is described below.
::textutil::split::splitn string ?len?
This command splits the given string into chunks of len characters and returns a list containing these chunks. The argument len
defaults to 1 if none is specified. A negative length is not allowed and will cause the command to throw an error. Providing an
empty string as input is allowed, the command will then return an empty list. If the length of the string is not an entire multiple
of the chunk length, then the last chunk in the generated list will be shorter than len.
::textutil::split::splitx string ?regexp?
This command splits the string and return a list. The string is split according to the regular expression regexp instead of a simple
list of chars. Note that if you parentheses are added into the regexp, the parentheses part of separator will be added into the
result list as additional element. If the string is empty the result is the empty list, like for split. If regexp is empty the
string is split at every character, like split does. The regular expression regexp defaults to "[\t \r\n]+".
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
regexp(n), split(n), string(n)
KEYWORDS
regular expression, split, string
CATEGORY
Text processing
textutil 0.7 textutil::split(n)