Sponsored Content
Top Forums Shell Programming and Scripting [Solved] FOR loop / IF statement returning error Post 302849515 by jfxdavies on Monday 2nd of September 2013 03:53:45 AM
Old 09-02-2013
Alister,

Thanks for the explanation - makes perfect sense.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

For loop statement - catch error

I'm having a question about for loops. (bash) I have the following for example: for file in `ls *.txt` do read file ... done Now when there is a file present there is no problem, now when there is no file present I get the following output in my standard mail box : "No such... (4 Replies)
Discussion started by: lumdev
4 Replies

2. UNIX for Dummies Questions & Answers

Loop on array variable returning error: 0 not found

I'm guessing i have a syntax error. I'm not sure it get's past the the while condition. I get an error 0 not found. Simple loop not sure what I'm doing wrong. #!/usr/bin/ksh set -A MtPtArray /u03 /u06 tUbound=${#MtPtArray } echo $tUbound i=0 while ($i -lt $tUbound) do print... (4 Replies)
Discussion started by: KME
4 Replies

3. UNIX for Dummies Questions & Answers

For loop returning more values

Hi All, Thanks all of you for the help you provide to me. Well, I have one more problem, where I am trying to pull file system information in the loop and display the filesystem percentege. I am using following code to achive this, nut it's giving the weired output. My file system is ... (1 Reply)
Discussion started by: alok.behria
1 Replies

4. UNIX for Dummies Questions & Answers

[Solved] Syntax error for awk in a loop

can some one please tell me what is the problem with my syntax:confused: I have 100 files in one folder 1. want to read each of the line by line 2. calculate their number of the words between the first word and the last word of each line 3. create file for each file with number of words... (8 Replies)
Discussion started by: A-V
8 Replies

5. Shell Programming and Scripting

for loop with internal unix command in statement throwing error

Hi I've gotten a plugin script that won't run. I keeps throwing an error at the following line. for BARCODE_LINE in `cat ${TSP_FILEPATH_BARCODE_TXT} | grep "^barcode"` do #something done The error reads ... (3 Replies)
Discussion started by: jdilts
3 Replies

6. Shell Programming and Scripting

[SOLVED] Problem in wait statement

Iam having a script which is used to load users and dumpfile in any given schema.Iam trying to autolog the script and have added two fucntion in it. function init_stdout_redirect { OUT_LOG=$1 OUT_PIPE=$(mktemp -u) # Create the output pipe mkfifo $OUT_PIPE # Save stdout and... (15 Replies)
Discussion started by: Vikram_Tanwar12
15 Replies

7. Shell Programming and Scripting

[Solved] 0403-057 Syntax error for if statement

I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values tstmb.sh: 1.5321e+08: 0403-057 Syntax error Below is my code snippet. #!/bin/ksh set -x TODAY=$(date +%y%m%d) for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
11 Replies

8. Shell Programming and Scripting

[Solved] While loop error when add sqlplus command

Hi gurus, I hit a block when write the script. I need do while loop, in the loop I have code below. sqlplus -s abc/abc@abc <<EOF spool testwhile select * from dual; spool off exit; EOF when I run script with only this code, it works fine. if I add code as below: #!/bin/ksh ... (5 Replies)
Discussion started by: ken6503
5 Replies

9. Shell Programming and Scripting

[Solved] If statement in bash

I have the following code in bash, however "set red frmt" is not displayed. echo "iarg_rd = $iarg_rd" iarg_rd="2" if ; then echo "Hello World" fi if ; then frmt="${gap}${!frmt_titl_yl}" elif ; then frmt="${gap}${!frmt_titl_bk}" elif ; then echo... (2 Replies)
Discussion started by: kristinu
2 Replies

10. Shell Programming and Scripting

Statement returning error only launching the sh script via crontab

hi all, I created a sh script to import some tables from mysql to hive. No problem launching it manually, but if I schedule via crontab it returns me an error in the following part: #create an array containing all the tables for $dbname query="SELECT table_name FROM information_schema.tables'... (10 Replies)
Discussion started by: mfran2002
10 Replies
scsi_sense_key(9F)					   Kernel Functions for Drivers 					scsi_sense_key(9F)

NAME
scsi_sense_key, scsi_sense_asc, scsi_sense_ascq - retrieve fields from SCSI sense data SYNOPSIS
#include <sys/scsi/scsi.h> uint8_t scsi_sense_key(uint8_t *sense_buffer); uint8_t scsi_sense_asc(uint8_t *sense_buffer); uint8_t scsi_sense_ascq(uint8_t *sense_buffer); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
sense_buffer Pointer to a buffer containing SCSI sense data. The sense data is expected in wire format starting at the response code. It can be in either fixed or descriptor format. DESCRIPTION
The scsi_sense_key() function returns the sense key value from the sense data contained in the sense_buffer. The scsi_sense_asc() function returns the additional sense code (ASC) value from the sense data contained in the sense_buffer. The scsi_sense_ascq() function returns the additional sense code qualifier (ASCQ) value from the sense data contained in the sense_buffer. The scsi_sense_key(), scsi_sense_asc(), and scsi_sense_ascq() functions are used to retrieve values from SCSI sense data, regardles of whether the sense data is in fixed format or descriptor format. Drivers should use scsi_validate_sense(9F) to ensure that valid sense key, asc, and ascq values are present in the sense data. RETURN VALUES
The scsi_sense_key() function returns the sense key value from the sense buffer. The scsi_sense_asc() function returns the additional sense code (ASC) from the sense buffer and the scsi_sense_ascq() function returns the additional sense code qualifier (ASCQ) from the sense buf- fer. CONTEXT
The scsi_sense_key(), scsi_sense_asc(), and scsi_sense_ascq() functions can be called from user or interrupt context. SEE ALSO
scsi_ext_sense_fields(9F), scsi_find_sense_descr(9F), scsi_sense_cmdspecific_uint64(9F), scsi_sense_info_uint64(9F), scsi_vali- date_sense(9F) SunOS 5.11 28 Jun 2006 scsi_sense_key(9F)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy