Sponsored Content
Top Forums Shell Programming and Scripting Linux- shell script - if then else - error Post 302605835 by dc_dc on Thursday 8th of March 2012 04:14:15 PM
Old 03-08-2012
Thanks it worked

Initially I created the sh file using Textpad in windows8 and ftpied it to Linux. even though opening the sh file thru vi editor the special chars where not visible
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "sc.sh" in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies

2. Shell Programming and Scripting

help with linux shell script

HI im a novice with shell scripts but i need help with a random script I have this folder filled with 500 different file names... I need help creating a script that will take each filename and make a new folder named that filename and then move that file into the newly created folder. Then the... (1 Reply)
Discussion started by: emachala
1 Replies

3. Shell Programming and Scripting

Linux Shell Script

I'm interested in writing a (hopefully) simple Linux Shell Script. Upon shutdown of the system (or upon reboot), I would like the script to automatically reset any changes made during that session. This includes files saved to the hard disk as well as any configuration changes. I would also like... (6 Replies)
Discussion started by: wilson735
6 Replies

4. Shell Programming and Scripting

Error executing shell script in Linux

Hi, I have following shell script code : ------------------------------------------------------------------ #!/bin/bash SCRIPTS_DIR="/scriptsDir1" # tables login/password APIL_USER="uname/pswd" I2_USER="uname/pswd" # Database DB="db1" cd "$SCRIPTS_DIR/scriptsDir2" sqlplus... (2 Replies)
Discussion started by: Chaitrali
2 Replies

5. Linux

Error executing shell script in Linux

Hi, I have following shell script code : ------------------------------------------------------------------ #!/bin/bash SCRIPTS_DIR="/scriptsDir1" # tables login/password APIL_USER="uname/pswd" I2_USER="uname/pswd" # Database DB="db1" cd "$SCRIPTS_DIR/scriptsDir2" sqlplus... (1 Reply)
Discussion started by: Chaitrali
1 Replies

6. Shell Programming and Scripting

PLEASE HELP! LINUX BASH SHELL SCRIPT

PLEASE HELP! NEED LINUX SCTIPT Need to write a bash shell script to show information of employees of a department from a company data set. The script should accept a project number (1/2/3/10/20/30) and output * the name of the project * the name of the manager of the controlling... (1 Reply)
Discussion started by: help123
1 Replies

7. Shell Programming and Scripting

Need help! Linux shell script

Hi all, I am trying to make a Nodemanager work in RHEL 5 I got this script from 'oraclemiddleware.wordpress.com', and made appropriate changes to suit my weblogic installation. I keep getting the error, "line 82: syntax error: unexpected end of file". I have checked every line to make sure all... (4 Replies)
Discussion started by: chakrv1
4 Replies

8. Homework & Coursework Questions

Linux Shell Script

Hi Guys I am new to Linux Shell Scripting . Can any one help me with this Task...files are attached for reference Task 1: write a script to generate a large size report file MX0002_new.XML by using the template MX0001_new.XML. Shell script is recomended, and it can run on Linux without... (2 Replies)
Discussion started by: samy_1811
2 Replies

9. Shell Programming and Scripting

Script Shell Linux

Hello, Please, how can I complete this script: Thank you (2 Replies)
Discussion started by: chercheur857
2 Replies

10. UNIX for Dummies Questions & Answers

Need some Help please with Linux shell script.

we need help with the syntax with this shell script, if you could create this shell script we can donate to a charity etc. we need to set up a directory called user3 inside directory user3 we need to create the following files : afile, anyfile, anotherfile, afiletest, bfile. bfiletest, cfile,... (3 Replies)
Discussion started by: cometboy
3 Replies
TBUF(3pub)																TBUF(3pub)

NAME
tbuf_create, tbuf_destroy, tbuf_copy, tbuf_cat, tbuf_length, tbuf_chars - manipulate text editor buffer SYNOPSIS
#include <publib.h> Tbuf *tbuf_create(const char *chars, size_t len); void tbuf_destroy(Tbuf *tbuf); Tbuf *tbuf_copy(Tbuf *tbuf, size_t offset, size_tlen); Tbuf *tbuf_cat(Tbuf *tbuf, Tbuf * tbuf); size_t tbuf_length(Tbuf *tbuf); void tbuf_chars(char *chars, Tbuf *tbuf, size_t offset, size_t len); DESCRIPTION
These routines create and manipulate simple text editor buffers, which can also be thought of as arbitrarily large text strings. The buf- fers are one-dimensional (i.e., not automatically divided into lines), and are indexed with character offsets. They are 8-bit and binary clean, i.e., they may contain any 8-bit characters, including the zero byte (''). tbuf_create creates a buffer from a C character array, and tbuf_destroy destroys it. Once it's created, a buffer may not be modified. Instead, a new buffer needs to be created, using tbuf_cat and tbuf_copy. They create the new buffer so that it shares as much memory as possible with the old buffer, so the immutability does not necessarily waste memory much. By never changing a buffer, it is rather simple to implement undo and redo: you only need to keep a list of buffers and display the suitable one to the user. The caller should remember to call tbuf_destroy for unnecessary buffers, of course. tbuf_length returns the number of characters in the buffer. tbuf_copy copies part of a buffer into a C character array. The array is not zero-terminated; the caller must do it himself. RETURN VALUE
tbuf_create, tbuf_copy, and tbuf_cat return a pointer to the new buffer, or NULL if the operation failed. tbuf_length returns the number of characters in the buffer. tbuf_destroy and tbuf_chars return nothing and cannot fail. SEE ALSO
publib(3), sbuf(3) AUTHOR
Lars Wirzenius, liw@iki.fi. TBUF(3pub)
All times are GMT -4. The time now is 05:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy