Sponsored Content
Full Discussion: Shellscripting -z option
Top Forums Shell Programming and Scripting Shellscripting -z option Post 303037907 by cokedude on Friday 16th of August 2019 05:42:32 PM
Old 08-16-2019
Is this what you wanted to see?

Code:
bash-4.2$ echo $BASH_VERSION
4.2.50(1)-release
bash-4.2$ ksh
$ echo $BASH_VERSION

$

--- Post updated at 05:42 PM ---

I think this is what you wanted.

Code:
bash-4.2$ echo ${#BASH_VERSION}
17
bash-4.2$ ksh
$ echo ${#BASH_VERSION}
0
$

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shellscripting question

I have been “commissioned” to write a shellscript to automate Oracle cold refeshes.. right now we perform about 20 refresh each 300gb in size which takes up our time. my goal is to write a shellscript which can be executed by a user on serverA to refresh any of the 7 databases on ServerA. I am... (4 Replies)
Discussion started by: jigarlakhani
4 Replies

2. Shell Programming and Scripting

Running SQLPLUS from Shellscripting ...

Hi guys, I am facing issues while triggering sqlplus with "/" option I can connect to database with USER ID and password. but, if i just specify "/" option since it is "externally identiifed user" it doesn't work Any suggestions? mail me @ Removed. Regards, Giri (2 Replies)
Discussion started by: chittari
2 Replies

3. Shell Programming and Scripting

New to shellscripting....need some help!

I have 3 shell scripts below.... I need to write a command line parser for these 3 utilities. basically the parser will accept ANY number of commands in this syntax -r = right -f = findtext -c = count so you do something like mu.s -r 3 4 5 -f hello goodbye.txt -c *.c -h 5 4 3 right... (5 Replies)
Discussion started by: TurboArkhan
5 Replies

4. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

5. Shell Programming and Scripting

New to shellscripting error: ./emailnotifications.sh: line 43: [: FH: integer expression expected

Hi , I'm a beginner in unix shell scripting need help in rectifying an error Source file :test.txt with Header ------ ----- Trailer ex: FH201010250030170000000000000000 abc def jke abr ded etf FE2 I was validating whether the header begin... (2 Replies)
Discussion started by: dudd9
2 Replies

6. Shell Programming and Scripting

Timeout in shellscripting

#!/bin/sh for ip in $(cat /root/Desktop/ftp.txt) do HOST=$ip USER='bob' PASS='bob' ftp -n $HOST <<EOF user bob bob EOF echo "$ip" done the Above code i want to use check and verify login works on multiple ftp servers on my network. However the ftp servers are dynamic in setup... (5 Replies)
Discussion started by: Noledge
5 Replies

7. Shell Programming and Scripting

shellscripting to edit xml file

I have an xml file where every line which has the word CDATA in it follows this pattern (line number) <word1><!]></>I need only these lines editing so that the end result is that (line number) <word1><!]></word1>so it copies the first bit to the end. Anyone know how I can do this I am... (10 Replies)
Discussion started by: legolad
10 Replies

8. Shell Programming and Scripting

small error in shellscripting -archival part

Hi All, I have run the below script but getting one small error. please help me to solve this. ERROR: tar: Error exit delayed from previous errors CODE: #! /bin/bash CEP=/home/user01/exercise/CEP ARCH=/home/user01/exercise/archive LOG=/home/user01/exercise/logs... (3 Replies)
Discussion started by: aish11
3 Replies
LIBBASH(7)							  libbash Manual							LIBBASH(7)

NAME
libbash -- A bash shared libraries package. DESCRIPTION
libbash is a package that enables bash dynamic-like shared libraries. Actually its a tool for managing bash scripts whose functions you may want to load and use in scripts of your own. It contains a 'dynamic loader' for the shared libraries ( ldbash(1)), a configuration tool (ldbashconfig(8)), and some libraries. Using ldbash(1) you are able to load loadable bash libraries, such as getopts(1) and hashstash(1). A bash shared library that can be loaded using ldbash(1) must answer 4 requirments: 1. It must be installed in $LIBBASH_PREFIX/lib/bash (default is /usr/lib/bash). 2. It must contain a line that begins with '#EXPORT='. That line will contain (after the '=') a list of functions that the library exports. I.e. all the function that will be usable after loading that library will be listed in that line. 3. It must contain a line that begins with '#REQUIRE='. That line will contain (after the '=') a list of bash libraries that are required for our library. I.e. every bash library that is in use in our bash library must be listed there. 4. The library must be listed (For more information, see ldbashconfig(8)). Basic guidelines for writing library of your own: 1. Be aware, that your library will be actually sourced. So, basically, it should contain (i.e define) only functions. 2. Try to declare all variables intended for internal use as local. 3. Global variables and functions that are intended for internal use (i.e are not defined in '#EXPORT=') should begin with: __<library_name>_ For example, internal function myfoosort of hashstash library should be named as __hashstash_myfoosort This helps to avoid conflicts in global name space when using libraries that come from different vendors. 4. See html manual for full version of this guide. AUTHORS
Hai Zaar <haizaar@haizaar.com> Gil Ran <ril@ran4.net> SEE ALSO
ldbash(1), ldbashconfig(8), getopts(1), hashstash(1) colors(1) messages(1) urlcoding(1) locks(1) Linux Epoch Linux
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy