Sponsored Content
Top Forums Shell Programming and Scripting #!/usr/bin/ksh Command Interpreter in a sh script Post 77476 by Perderabo on Friday 8th of July 2005 04:42:06 PM
Old 07-08-2005
sh is ignoring it because it's a comment. Feeding a ksh script into sh like that is not the correct thing to do. But if you do it, sh will attempt to run it. Read our faq article on this subject.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ksh: /usr/bin/ls: arg list too long

I am using IBM AIX unix version 4.3.3.0. In a directory there are many files with different patterns. When I am trying to execute the command, ls -l with the file pattern, which have fewer files it gives the desired result. However when I am trying to execute the same command for file pattern,... (2 Replies)
Discussion started by: jitindrabappa
2 Replies

2. Tips and Tutorials

The Whole Story on #! /usr/bin/ksh

Introduction Originally, we only had one shell on unix. When ran a command, the shell would attempt to invoke one of the exec() system calls on it. It the command was an executable, the exec would succeed and the command would run. If the exec() failed, the shell would not give up, instead it... (3 Replies)
Discussion started by: Perderabo
3 Replies

3. Shell Programming and Scripting

Problem with /usr/bin/cd command

Hi , My shell script doesnt function properly while executing. My shell script has the below mentioned code in it. #!/bin/sh CD="/usr/bin/cd" .. .. $CD / .. .. main intention behind giving the $CD / is to replace the cd command with /usr/bin/cd at the time of program execution. ... (5 Replies)
Discussion started by: raghu.amilineni
5 Replies

4. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

5. Shell Programming and Scripting

!/usr/bin/ksh error

Usually we use !/usr/bin/ksh at the start of the script.But if I am having this stuff in the scripts and calling one script from other its not working.What may be the reason behind it ? xyz.ksh #!/usr/bin/ksh echo "Hi" abc.ksh #!/usr/bin/ksh echo "I am fine" ksh xyz.ksh Its... (4 Replies)
Discussion started by: dr46014
4 Replies

6. AIX

aix:ksh: /usr/bin/rm: 0403-027 The parameter list is too long.

Hi, I am getting the below error message When i am trying to delete the files from the directory.Could you please guide me? rm *.aud ksh: /usr/bin/rm: 0403-027 The parameter list is too long. and find /oracle/admin/testP/adump/*.aud -mtime +5 -exec rm {} \; ksh: /usr/bin/find:... (3 Replies)
Discussion started by: nokiae63
3 Replies

7. Shell Programming and Scripting

/usr/bin/ksh -E

I saw one script using the first line as below /usr/bin/ksh -E I have used -x for debug but couldn't find what is this -E option for ? Pls let me know what is this -E used for Thanks RL (1 Reply)
Discussion started by: reldb
1 Replies

8. Shell Programming and Scripting

-bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory

I keep getting this error and I am not sure why. -bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory First I run my makefile and this works fine: goodmain: main.o gcc -o goodmain main.o main.o: main.c gcc -c main.c Then I want to limit my output so I... (11 Replies)
Discussion started by: cokedude
11 Replies
SM(1)							    InterNetNews Documentation							     SM(1)

NAME
sm - Command-line interface to the INN storage manager SYNOPSIS
sm [-cdHiqRrSs] [token ...] DESCRIPTION
The INN storage manager is the subsystem that stores and keeps track of all of the articles and what storage backend they're in. All stored articles are assigned a storage API token. sm is a command-line interface to that storage manager, primarily used to retrieve articles by those tokens but also to perform other operations on the storage subsystem. token is the token of an article (the same thing that's returned by grephistory or stored in the history file). It looks something like: @0502000005A4000000010000000000000000@ Any number of tokens can be given on the command-line for any function other than -s. If none are, sm normally reads tokens from standard input, one per line. The default operation is to retrieve and write to standard output the corresponding article for each token given. If -s is given, sm instead stores the article given on standard input (in native format, not wire format) using the standard rules of the storage subsystem. If the article is stored successfully, the token of the article is printed to standard output. Please note that this does not make any attempt to write a history entry or any overview data, and is therefore only useful under very specific circumstances. OPTIONS
-c Show a clear, decoded form of the storage API token. Each part of the token is explained, in a human-readable string. Amongst other elements, this command gives the path to where the corresponding article is supposed to be stored. -d, -r Rather than retrieving the specified article, remove the article. This will delete the article out of the news spool and it will not subsequently be retrievable by any part of INN. It's equivalent to "ctlinnd cancel" except it takes a storage API token instead of a message-ID. -H Retrieve only the headers of the article rather than the entire article. This option cannot be used with -d, -r, -i, or -S. -i Show the newsgroup name and article number associated with the token rather than the article itself. Note that for crossposted articles, only the first newsgroup and article number to which the article is associated will be returned. -q Suppress all error messages except usage errors. -R Display the raw article. This means that line endings won't be converted to native line endings and will be left as CRLF sequences; leading periods will still be escaped for sending over NNTP, and the article will end in a CRLF.CRLF sequence. -S Write the article to standard output in the format used by rnews spool files. Multiple articles can be written in this format, and the resulting output can be fed to rnews (on another system, for example) to inject those articles into INN. This option cannot be used with -d, -r, -H, -i, or -R. -s Store the article given on standard input using the normal storage rules for articles as configured in storage.conf(5). Print the new token for the message to standard output if it is stored successfully. If this option is given, no other options except possibly -q should be given. EXIT STATUS
If all operations were successful, sm exits with status 0. If an operation on any of the provided tokens fails, sm will exit with status 1, even if the operations on other tokens were successful. In other words, if twenty tokens are fed to "sm -r" on stdin, 19 articles were successfully removed, but the sixth article couldn't be found, sm will still exit with status 1. This means that if you need to be sure whether a particular operation succeeded, you should run sm on one token at a time. HISTORY
Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews. Rewritten in POD by Russ Allbery <rra@stanford.edu>. $Id: sm.pod 8818 2009-11-17 18:58:24Z iulius $ SEE ALSO
ctlinnd(8), grephistory(1), history(5), rnews(1), storage.conf(5). INN 2.5.3 2010-02-08 SM(1)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy