Sponsored Content
Full Discussion: ksh ./sort.sh: not found
Top Forums Shell Programming and Scripting ksh ./sort.sh: not found Post 302392414 by drl on Thursday 4th of February 2010 10:36:48 AM
Old 02-04-2010
Hi.

Probably edited in Windows. For example:
Code:
#!/bin/ksh

# @(#) s1	Demonstrate script file not found.

# Simulate the entering of the script file.
cp sacred-file sort.sh

echo
echo " Sample script file sort.sh:"
cat sort.sh

echo
echo " Sample script file sort.sh, showing invisible characters:"
cat -A sort.sh

echo
echo " Execution of sort.sh:"
./sort.sh

# Change line to simulate coming from Windows / DOS.

echo
echo " Script sort.sh would look like this if from DOS / Windows:"
flip -m sort.sh
cat -A sort.sh

echo
echo " Execution of sort.sh with DOS line endings:"
./sort.sh

echo
echo " And yet it exists and has appropriate permissions:"
ls -lgG sort.sh

exit 0

producing:
Code:
% ./s1

 Sample script file sort.sh:
#!/bin/ksh

# @(#) s1	Simple test script.

echo " Hello, world."

 Sample script file sort.sh, showing invisible characters:
#!/bin/ksh$
$
# @(#) s1^ISimple test script.$
$
echo " Hello, world."$

 Execution of sort.sh:
 Hello, world.

 Script sort.sh would look like this if from DOS / Windows:
#!/bin/ksh^M$
^M$
# @(#) s1^ISimple test script.^M$
^M$
echo " Hello, world."^M$

 Execution of sort.sh with DOS line endings:
./s1[29]: ./sort.sh: not found [No such file or directory]

 And yet it exists and has appropriate permissions:
-rwxr-xr-x 1 70 Feb  4 09:32 sort.sh

If you create a file with Windows / DOS line endings, you will need to convert it to *nix format. There are many such utilities you can use. In Linux, there is flip, in other systems there is dos2unix, etc.

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Solaris-ksh: directory not found

Solaris 8 using ksh: I have a directory called apps...in that directory there are some flat files and some directories. I can't access one particular subdirectory called netscape-old. I am NOT logged in as root Here is the info... user@machine>ls -l drwxr-xr-x 3 root other ... (5 Replies)
Discussion started by: dangral
5 Replies

2. UNIX for Advanced & Expert Users

ksh: cvs: not found ??

Hi, I've set up putty/ plink to work with cvs on windows and connect via ssh to unix where my cvs repository is. I want to use wincvs to log in to my cvs repository. However, I get an error when I run the following command (on windows): cvs -d :ext:user@server:/path/to/repository status ... (2 Replies)
Discussion started by: rein
2 Replies

3. Programming

ksh: make: not found

$ make ksh: make: not found Hello, when i use the "make" command in Solaris, it says the "make" command is not found! Any help appreciated! BobK (3 Replies)
Discussion started by: bobk544
3 Replies

4. Shell Programming and Scripting

procedure/function not found in .ksh

Hi all , I am getting an error "job_procfile not found" while excecuting a .ksh script. The script is used to create control-m ( scheduler ) jobs dynamically by reading parameter files ( flat filescomma seperated ) job_procfile is a function within the .ksh script The script is something... (8 Replies)
Discussion started by: rajesh_ramaoz
8 Replies

5. Shell Programming and Scripting

Problem with script: ksh not found

Hello Guys, what is the significance of using #!/bin/sh at the start of shell script. my default shell is ksh, when i run my script i have ksh: not found error and when i use ./myscript it works. Can anyone explain me the problem please ? tnx (1 Reply)
Discussion started by: midhun_u
1 Replies

6. UNIX for Dummies Questions & Answers

ksh not found in solaris

Hi , I am new to solaris world but worked in unix for a while . I have this solaris box version 8 .I am trying to run a simple unix file . Q.shl cat Q.shl #!/bin/ksh db2 get connection state When I run the file I get following error : Q.shl ksh: Q.shl: not found This is... (6 Replies)
Discussion started by: capri_drm
6 Replies

7. Shell Programming and Scripting

/bin/ksh: scriptname: not found. ???

I have started to write Korn scripts on the client's AIX 4.2 servers and there is this small problem that puzzles me. I code all my scripts the same way: - first line contains : #!/bin/ksh - I do this console command on every scripts: chmod +x scriptname But still, on some occasions,... (4 Replies)
Discussion started by: Browser_ice
4 Replies

8. Shell Programming and Scripting

ksh not found on remote server

Hi guys, I need to run batch jobs on a remote machine. I have been able to make a connection with a user2 login details via ssh, and have tested that I am in the correct directory etc. Problem is that when I try to run the batch job, I keep getting a ksh <batchjobname> not found. If doing it... (1 Reply)
Discussion started by: Hopper_no1
1 Replies

9. Shell Programming and Scripting

ksh:not found

Hi, i used to run oracle queries in unix and then transfer the result in to csv files. it was working fine for a month.but today it showed an error like ksh>dimens_minus_scpt.sh not found. Can someone please help. Thanks. :wall: (4 Replies)
Discussion started by: varadharajan87
4 Replies

10. Shell Programming and Scripting

ksh: <a perl file name> not found

I am using a perl file to run a batc job from unix prompt. I am inside the correct directory where the perl file is located. I can even find the file using ls command. But when I run the perl file , it says 'ksh: <perl_file.pl> not found'. Could anyone please let me know what is wrong? (4 Replies)
Discussion started by: Subhasis
4 Replies
WRAP-AND-SORT(1)					      General Commands Manual						  WRAP-AND-SORT(1)

NAME
wrap-and-sort - wrap long lines and sort items in Debian packaging files SYNOPSIS
wrap-and-sort [options] DESCRIPTION
wrap-and-sort wraps the package lists in Debian control files. By default the lists will only split into multiple lines if the entries are longer than 80 characters. wrap-and-sort sorts the package lists in Debian control files and all .install files. Beside that wrap-and-sort removes trailing spaces in these files. This script should be run in the root of a Debian package tree. It searches for control, control.in, copyright, copyright.in, install, and *.install in the debian directory. OPTIONS
-h, --help Show this help message and exit. -a, --wrap-always Wrap all package lists in the Debian control file even if the entries are shorter than 80 characters and could fit in one line line. -s, --short-indent Only indent wrapped lines by one space (default is in-line with the field name). -b, --sort-binary-packages Sort binary package paragraphs by name. -k, --keep-first When sorting binary package paragraphs, leave the first one at the top. Unqualified debhelper(7) configuration files are applied to the first package. -n, --no-cleanup Do not remove trailing whitespaces. -d path, --debian-directory=path Location of the debian directory (default: ./debian). -f file, --file=file Wrap and sort only the specified file. You can specify this parameter multiple times. All supported files will be processed if no files are specified. -v, --verbose Print all files that are touched. AUTHORS
wrap-and-sort and this manpage have been written by Benjamin Drung <bdrung@debian.org>. Both are released under the ISC license. DEBIAN
Debian Utilities WRAP-AND-SORT(1)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy