Sponsored Content
Top Forums Shell Programming and Scripting #!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script Post 302364427 by cfajohnson on Friday 23rd of October 2009 03:29:40 AM
Old 10-23-2009

If the file was created on a Windows box (or anywhere that doesn't use UNIX line endings), remove the carriage return from the end of each line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error in shell script when #!/bin/bash is used as shebang

#!/bin/ksh echo -en "\033|||'-')) echo -e "\033 The above script works fine when the interpreter is ksh, but outputs the following error when #!/bin/bash is used as shebang: test.sh: line 5: syntax error near unexpected token `(' test.sh: line 5: `case "$ACTIVATION_KEY" in +(|||'-'))' (2 Replies)
Discussion started by: proactiveaditya
2 Replies

2. Shell Programming and Scripting

bash syntax error: command not found

I am trying to create a shell that asks the user to enter their name, and compare it to my own by saying we have the same name or saying my name and that they have a nice name too. Here is my script... #!/bin/bash-x echo "Enter your name". read name if then echo "My name is Adam too"... (1 Reply)
Discussion started by: amaxey45
1 Replies

3. UNIX for Dummies Questions & Answers

Mac OSX Cron Script Execution

Hello, On Mac OSX, I was wondering about my Cron Script: HELL=/bin/tcsh PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/var/log MAILTO=jwillis 25 1 * * * root /Users/jwillis/Fbcmd\Scripts/DailyBirthday.scrmy returned message is: Subject: Cron... (3 Replies)
Discussion started by: jwillis0720
3 Replies

4. UNIX for Dummies Questions & Answers

Split and Rename files using Terminal and bin/bash

I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example, blah blah blah ;;; blah bhlah hlabl awasnceuir asenduhfoijhacseiodnbfxasd;;; oabwcuhaweoir;;; This full file would be three separate files... (7 Replies)
Discussion started by: mschpers
7 Replies

5. Shell Programming and Scripting

rm:command not found in linux Bash shell script

Hi All, Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux Issue: While executing shell scripts in bash shell, following error messages are thrown: rm:command not found On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Discussion started by: a1_win
9 Replies

6. OS X (Apple)

Creating Shell Script for STIG Checklist MAC OSX 10.6

Hello, I am new to Mac OSX and shell scripting all together. I was wondering if anyone could help get me started in a few scenarios so that I would be able to automate checking a system against a STIG checklist. A STIG Checklist is a DoD Guideline for securing systems. Here is the first... (3 Replies)
Discussion started by: john3j04
3 Replies

7. Shell Programming and Scripting

/bin/bash: Event not found.

Hi I'm new to scripting - please help me... I'm trying to run a script written by a friend: #!/bin/bash for aStat in .... do .... done when coping the script to the terminal I get: /bin/bash: Event not found. for: Command not found. (7 Replies)
Discussion started by: atira
7 Replies

8. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies

9. OS X (Apple)

A new OSX 10.12.x terminal from the command line.

Hi guys and gals... After much searching on the good ol' internet I could find nothing, so this is the result. ALthough many people seem to have asked this question no-one seems to have a solution so here we go. I need for AudioScope.sh, 'xterm' to run a second program for some of its... (2 Replies)
Discussion started by: wisecracker
2 Replies

10. UNIX for Beginners Questions & Answers

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ? --- Post updated at 08:39 AM --- in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies
lp(7)							 Miscellaneous Information Manual						     lp(7)

NAME
lp - line printer SYNOPSIS
Remarks This manual entry applies only to a certain group of printers. For Series 800, it applies to printers controlled by the device driver It does apply to any printers on Series 700 systems. DESCRIPTION
This section describes capabilities provided by many line printers supported by various versions of the HP-UX operating system. A line printer is a character special device that may optionally have an interpretation applied to the data. If the character special device file has been created with the raw option (see the HP-UX System Administrator manuals for information about creating device files with the raw option), data is sent to the printer in (as, for example, when handling a graphics printing operation). In raw mode, no interpretation is done on the data to be printed, and no page formatting is performed. Data bytes are simply sent to the printer and printed exactly as received. If the device file does not contain the raw option, data can still be sent to the printer in raw mode. Raw mode is set and cleared by the request. If the line printer device file does not contain the raw option, data is interpreted according to rules discussed below. The driver under- stands the concept of a printer page in that it has a page length (in lines), line length (in characters), and offset from the left margin (in characters). The default line length, indent, lines per page, open and close page eject, and handling of backspace are set to defaults determined when the printer is opened and recognized by the system the first time. If the printer is not recognized, the default line length is 132 characters, indent is 4 characters, lines per page is 66, one page is ejected on close and none on open, and backspace is handled for a character printer. The following rules describe the interpretation of the data stream: o A form feed causes a page eject and resets the line counter to zero. o Multiple consecutive form-feeds are treated as a single form-feed. o The new-line character is mapped into a carriage-return/line-feed sequence, and if an offset is specified a number of blanks are inserted after the carriage-return/line-feed sequence. o A new-line that extends over the end of a page is turned into a form-feed. o Tab characters are expanded into the appropriate number of blanks (tab stops are assumed to occur every eight character positions as offset by the current indent value). o Backspaces are interpreted to yield the appropriate overstrike either for a character printer or a line printer. o Lines longer than the line length minus the indent (i.e., 128 characters, using the above defaults) are truncated. o Carriage-return characters cause the line to be overstruck. o When it is opened or closed, a suitable number of page ejects is generated. Two ioctl(2) requests are available to control the lines per page, characters per line, indent, handling of backspaces, and number of pages to be ejected at open and close times. At either open or close time, if no page eject is requested the paper will not be moved. For opens, line and page counting will start assuming a top-of-form condition. The ioctl requests have the following form: The possible values of request are: Get the current printer status information and store in the structure to which arg points. Set the current printer status information from the structure to which arg points. The structure used in the and requests is defined in and includes the following members: short int ind; /* indent */ short int col; /* columns per page */ short int line; /* lines per page */ short int bksp; /* backspace handling flag */ short int open_ej; /* pages to eject on open */ short int close_ej; /* pages to eject on close */ short int raw_mode; /* raw mode flag */ These are remembered across opens, so the indent, page width, and page length can be set with an external program. If the field is set to zero, the defaults are restored at the next open. If the backspace handling flag is 0, a character printer is assumed and backspaces are passed through the driver unchanged. If the flag is a 1, a line printer is assumed, and sufficient print operations are generated to generate the appropriate overstruck characters. If the raw mode flag is 0, data sent to the printer is formatted according to indent, columns per page, lines per page, backspace handling, and pages to eject on open and close. If the raw mode flag is 1, data sent to the printer is not formatted. If the raw mode flag is changed from 1 to 0 (raw mode is turned off) and the format settings (indent, columns per page, etc.) have not been modified, the data is formatted according to the prior format settings. AUTHOR
was developed by HP and AT&T. FILES
default or standard printer used by some HP-UX commands; special files for printers SEE ALSO
lp(1), slp(1), ioctl(2), cent(7), intro(7). Seires 800 Only lp(7)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy