Sponsored Content
Top Forums Shell Programming and Scripting programme is ok but not working in script Post 302493863 by gc_sw on Friday 4th of February 2011 03:10:13 AM
Old 02-04-2011
Data programme is ok but not working in script

hi buddies;

i have a very strange problem. i made a script composed of just 5 line. it is containing awk and nawk codes and it is working perfectly when it is applied one-by-one (copy & paste).
but when i type run myscript.mos, it is giving:
Code:
nawk: syntax error at source line 1
context is
bla bla bla...

error??? SmilieSmilie
how can this strange situation happen in such a strange manner??

note: i'm on Solaris.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to compile the c programme in unix

Hi, My name is vreddy and I am learning c language now and written one programme on vi editor. how do I compile the programme please give me some advice and that would be helpfull for me. thanks vre (10 Replies)
Discussion started by: vasudeva
10 Replies

2. Shell Programming and Scripting

want to use output of c programme in expect

hi i am having a c code which gives the output of my password in text format i.e when i run my c code which which gives the password asfollows====>>>>>> $./passwdprogram ======>>>>>>abc@123(this is the output) now i have an expect script to remotely ssh which uses the password set in ... (0 Replies)
Discussion started by: xander
0 Replies

3. Programming

Need help in a c programme

Dear Friends, I ve two text files like re_im.dat 13.7663000000 5.9572200000 10.2682000000 10.9345000000 5.0810700000 14.1132000000 two real values per row Sarf.dat 127 128 128 128 71 0 128 128 128 128 71 0 128 128 128 128 71 0 This is having 6... (2 Replies)
Discussion started by: user_prady
2 Replies

4. Shell Programming and Scripting

snmpget in a perl programme

Hi Guyz can u tell me how to write a programme in perl using snmpget. Regards' Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies

5. Programming

cobol programme

I have some compile programme .crn now I want to run .crn programme on express cobol which allow only *.gnt programme any solution to run *.crn programme (0 Replies)
Discussion started by: bibi
0 Replies

6. Programming

help with C programme to lock remote resources

hello every one i am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc). i have maintained connection using JAVA RMI and using JAVA JNI to lock resources, now i am really stuck up with C programme to do actual locking, i am using RHL-5 on admin computer... (7 Replies)
Discussion started by: zius_oram
7 Replies

7. Programming

starting programme in C

hello, For school i make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an well example so i can make the mission thank you (1 Reply)
Discussion started by: wouter88
1 Replies

8. Programming

Help for coding this programme

for a floating-point array x whose size is n, find the geometric mean.. GM =n x1.x2.x3...xn (2 Replies)
Discussion started by: allyjaah
2 Replies

9. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

10. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
service(8)						      System Manager's Manual							service(8)

NAME
service - run a System V init script SYNOPSIS
service SCRIPT COMMAND [OPTIONS] service --status-all service --help | -h | --version DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /. The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start command. service --status-all runs all init scripts, in alphabetical order, with the status command. If the init script file does not exist, the script tries to use legacy actions. If there is no suitable legacy action found and COMMAND is one of actions specified in LSB Core Specification, input is redirected to the systemctl. Otherwise the command fails with return code 2. FILES
/etc/init.d The directory containing System V init scripts. ENVIRONMENT
LANG, TERM The only environment variables passed to the init scripts. SEE ALSO
chkconfig(8), ntsysv(8), systemd(1), systemctl(8), systemd.service(5) Jan 2006 service(8)
All times are GMT -4. The time now is 07:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy