02-08-2008
Thanks for the quick response.
How can I set $TERM properly? Also be specific I am facing 2 problems :
1) I am not able to use tail properly. (Exactly I need last 25000 lines of a line and tail -25000 filename.txt is giving me default number of lines)
2) On pressing up arrow key the last command executed should be displayed which is not happening.
Also which tail is giving me the following output :
/usr/bin/tail
Please suggest me the way I can do these.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all!
I have two consoles.I know the PID of these two.Now I want to execute a command in console#1 but from console#2. How can I achieve this?
Anyone can do something for my query?
Click here if you can't understand my query or to know the need for this query. (3 Replies)
Discussion started by: rakabarp
3 Replies
2. Programming
Hi guys,
I know using system() we can run unix commands but the problem is, I can't get any returns with the system(). I am returning stuff from my shell scripts that I need to be able to read from my C code.
Anybody has cure to this problem? :))
Thanks (2 Replies)
Discussion started by: alirezan
2 Replies
3. Shell Programming and Scripting
Hi, I am very new to shell scripting.
I have a script called "RunDMol3.sh" which takes a directory name as input parameter, process somthing using files in the folder and writes output files in the same folder. This is a very heavy job and takes about 1.5 hrs.
When I run in manually the script... (2 Replies)
Discussion started by: ramesh.jitkar
2 Replies
4. Shell Programming and Scripting
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies
5. Shell Programming and Scripting
Hi guys, so, I have a server running an sqlite database which is accessed by many client machines working as hardware testers, whenever something fails and needs to be replaced the operator would have to enter the Serial Number of the part being replaced as well as some other data. and... (0 Replies)
Discussion started by: sx3v1l_1n51de
0 Replies
6. Shell Programming and Scripting
Hello all-
I have done a lot of searching tonight, but all leads seem to be dead ends. Forgive me if this has been covered, but I've searched the forum and the internet. I am having trouble building a shell script which uses SSH to login to our schools 1024 cluster grid. The issue that I am... (1 Reply)
Discussion started by: Sagan
1 Replies
7. Shell Programming and Scripting
I am trying to assign a command to a variable and use it. I have tried every possible quoting variation except the correct one. :confused: Here is an example:
CMD="grep description $i | grep "::""
$CMD | nawk ...Thanks in advance for you help. (1 Reply)
Discussion started by: aschera
1 Replies
8. OS X (Apple)
I'm in a situation where I am executing a shell script(Bash) on another machine remotely using ssh, and for various reasons sometimes need to quit it and restart it. The shell script being run does many different things, so its hard to know what process to kill on the remote machine, and even if I... (2 Replies)
Discussion started by: TheDrizzle
2 Replies
9. Shell Programming and Scripting
Hi ,
I am trying to use the below in awk but failed, any one assist please,
awk '{ print $0;
if ( $0 ~ /LOADTMP1/ )
{
print $4;
Table_name=system($( db2 -x "SELECT TRIM(TD.BSCHEMA) || '.' || TRIM(TD.BNAME) AS TABLE_NAME FROM SYSCAT.TABDEP TD WHERE
TD.BTYPE='T' AND... (2 Replies)
Discussion started by: Nandy
2 Replies
10. Shell Programming and Scripting
I am running plsql using printf on a shell, but i am getting some strange error, can someone point what exactly am i missing,
$ echo $SHELL
/bin/bash
$ printf "
> SET serveroutput ON trimspool on feed off echo off
> declare
> p_val number;
> d_val varchar2(10);
> begin
> SELECT... (1 Reply)
Discussion started by: kamauv234
1 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