02-02-2016
Quote:
Originally Posted by
picemma
I edit this scrip with notepad++ on windows, the script is in a shared folder betwin my windows and my Debian VM
Do you belive if I edit my script via nano on my Debian VM it will works?
Thank you
Probability is high. Why don't you give it a try?
Other measures would include modifying your
script in a way RavinderSingh13 showed.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Following is my shell script.
#!/bin/tcsh
view=$1
image=$2
objfld="obj-ppc-$image"
echo $view
echo $image
echo $objfld
echo "cleartool setview $view"
cleartool setview $view;
cd `cd /vob/ios/sys`;
In this "cd" is not working and not getting any error.
my shell is "tcsh"... (3 Replies)
Discussion started by: amitrajvarma
3 Replies
2. UNIX for Dummies Questions & Answers
hi
i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script
example:
file name is test.vbs which contains
strSoundFile = "C:\windows\Media\Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies
3. Shell Programming and Scripting
typeset -l section
section=${2:-.}
what does these 2 lines meaning? (1 Reply)
Discussion started by: venkatababu
1 Replies
4. Shell Programming and Scripting
Hello.
I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct.
We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below:
H:\>ftp ftpxxxxx
Connected to entvc2ft07-pub.xxxxx.com.
220 Microsoft FTP Service
User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx
331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies
6. Shell Programming and Scripting
Hello,
I work on Windows and I use Putty to access a remote UNIX server.
I am trying to build a shell script that will have as main task to open the
Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies
7. Shell Programming and Scripting
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies
8. Shell Programming and Scripting
Hi, the following command works in the terminal no problem.
samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 Replies
9. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
10. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
scotty(1) Tnm Tcl Extension scotty(1)
__________________________________________________________________________________________________________________________________________________
NAME
scotty - A Tcl shell including the Tnm extensions.
SYNOPSIS
scotty ?fileName arg arg ...?
_________________________________________________________________
DESCRIPTION
scotty is a Tcl interpreter with extensions to obtain status and configuration information about TCP/IP networks. After startup, scotty
evaluates the commands stored in .scottyrc and .tclshrc in the home directory of the user.
SCRIPT FILES
If scotty is invoked with arguments then the first argument is the name of a script file and any additional arguments are made available to
the script as variables (see below). Instead of reading commands from standard input scotty will read Tcl commands from the named file;
scotty will exit when it reaches the end of the file.
If you create a Tcl script in a file whose first line is
#!/usr/local/bin/scotty2.1.11
then you can invoke the script file directly from your shell if you mark the file as executable. This assumes that scotty has been
installed in the default location in /usr/local/bin; if it's installed somewhere else then you'll have to modify the above line to match.
Many UNIX systems do not allow the #! line to exceed about 30 characters in length, so be sure that the scotty executable can be accessed
with a short file name.
An even better approach is to start your script files with the following three lines:
#!/bin/sh
# the next line restarts using scotty
exec scotty2.1.11 "$0" "$@"
This approach has three advantages over the approach in the previous paragraph. First, the location of the scotty binary doesn't have to
be hard-wired into the script: it can be anywhere in your shell search path. Second, it gets around the 30-character file name limit in
the previous approach. Third, this approach will work even if scotty is itself a shell script (this is done on some systems in order to
handle multiple architectures or operating systems: the scotty script selects one of several binaries to run). The three lines cause both
sh and scotty to process the script, but the exec is only executed by sh. sh processes the script first; it treats the second line as a
comment and executes the third line. The exec statement cause the shell to stop processing and instead to start up scotty to reprocess the
entire script. When scotty starts up, it treats all three lines as comments, since the backslash at the end of the second line causes the
third line to be treated as part of the comment on the second line.
VARIABLES
Scotty sets the following Tcl variables:
argc Contains a count of the number of arg arguments (0 if none), not including the name of the script file.
argv Contains a Tcl list whose elements are the arg arguments, in order, or an empty string if there are no arg arguments.
argv0 Contains fileName if it was specified. Otherwise, contains the name by which scotty was invoked.
tcl_interactive Contains 1 if scotty is running interactively (no fileName was specified and standard input is a terminal-like device), 0
otherwise.
PROMPTS
When scotty is invoked interactively it normally prompts for each command with ``% ''. You can change the prompt by setting the variables
tcl_prompt1 and tcl_prompt2. If variable tcl_prompt1 exists then it must consist of a Tcl script to output a prompt; instead of out-
putting a prompt scotty will evaluate the script in tcl_prompt1. The variable tcl_prompt2 is used in a similar way when a newline is typed
but the current command isn't yet complete; if tcl_prompt2 isn't set then no prompt is output for incomplete commands.
SEE ALSO
Tnm(n), Tcl(n)
AUTHORS
Juergen Schoenwaelder <schoenw@cs.utwente.nl>
Tnm scotty(1)