Sponsored Content
Top Forums Shell Programming and Scripting Python - Function print vs return - whats wrong Post 302942018 by oky on Thursday 23rd of April 2015 02:24:15 PM
Old 04-23-2015
Don,

This is not a homework problem. I have corrected the code now its looking good
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Whats wrong with my function?? <newbie>

First of all im using Bash, on a Debian-based machine. I tried to write a function that if the ls program found listed more than 25 lines I would automaticly use "ls | less". Its on another computer but if I recall it looked something like this... Note: some code may look strange because im on... (4 Replies)
Discussion started by: riwa
4 Replies

2. Shell Programming and Scripting

tell me whats wrong in this?

#! /bin/bash head -5 $1 echo "remove $1 ?" read answer if then echo invalid answer elif rm $1 echo "$1 is deleted" elif then echo file is not deleted else echo "invalid answer" fi What i really want this to do is to ask to delete the file or not..it says something wrong... (1 Reply)
Discussion started by: nadman123
1 Replies

3. Shell Programming and Scripting

tell me whats wrong with this

#! /bin/bash USAGE=" | ] if then echo "$USAGE" exit 1 fi while getopts lb: OPTION do case $(OPTION)in a) echo Hi there! exit 2;; b) echo hello o) OARG=$OPTARG;; \?)echo "$USAGE" ;; exit 2;; esac done shift `expr... (1 Reply)
Discussion started by: nadman123
1 Replies

4. Shell Programming and Scripting

whats wrong with this code

ls -ld | grep $1 /etc/passwd | cut -d: -f6 i need see the content... (4 Replies)
Discussion started by: nadman123
4 Replies

5. UNIX for Dummies Questions & Answers

Whats wrong in the script?

if then if then echo "fst argument is $1 " else if then "fst argument is $1" fi fi fi Can anyone tell me. My requirement is tht pass a string .. Check whether it contains "-". If yes then check if it... (1 Reply)
Discussion started by: nehagupta2008
1 Replies

6. UNIX for Dummies Questions & Answers

whats wrong with this?

can anyone tell me why this code doesn't work how its supposed to, its the hangman game but it doesn't play how its supposed to #!/bin/bash NoAttempts="0" livesgiven="5" LivesRemain=$livesgiven LettersAttempted="" wordfile=words numwords=0 function menu() { clear cat << menu... (1 Reply)
Discussion started by: ferrycorsten73
1 Replies

7. Shell Programming and Scripting

whats wrong in my code

Code: #!/usr/bin/perl -w use strict; use warnings; #Clears Screen $CLEAR=`clear`; print $CLEAR; i get the below error: Global symbol "$CLEAR" requires explicit package name at ./mutmg.pl line 6. Global symbol "$CLEAR" requires explicit package name at ./mutmg.pl line 7. (1 Reply)
Discussion started by: sophos
1 Replies

8. Shell Programming and Scripting

Whats wrong in the Function ?

Need your assistance, to find the bug in the function. Function usage erroring out even after passing parameters. usage() { if || ; then echo "************************************************************" echo " CHECK USAGE FOR CORRECT PARAMETERS ... (26 Replies)
Discussion started by: raghunsi
26 Replies

9. Homework & Coursework Questions

Whats wrong with the following

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: ls -ld htdocs drwxr-x--- 3 root root 8192 2006-11-19 10:41 htdocs How would a host administrator... (1 Reply)
Discussion started by: Larry_1
1 Replies

10. UNIX for Dummies Questions & Answers

Whats wrong with this if-else

hi whats wrong in below?? CHECK=M10; if ; then echo "hello hi"; else echo "how are u hello hi"; fi I am getting error as ./test.sh: line 2: ' ./test.sh: line 2: M10: command not found ./test.sh: line 2: M10: command not found ./test.sh: line 2: M10: command not found (8 Replies)
Discussion started by: skyineyes
8 Replies
fverify(8)						      System Manager's Manual							fverify(8)

Name
       fverify - verify software subsets

Syntax
       fverify [-yn]

Description
       The  command  reads  subset  inventory  records	from standard input and verifies that the attributes for the files on the system match the
       attributes listed in the corresponding records.	Invoking with no arguments causes it to report errors to the standard  output  and  prompt
       the user for confirmation before making corrections.

       Missing	files and inconsistencies in file size, checksum, user id, group id, mode, and file type are reported.	If inconsistencies in user
       id, group id or mode are detected the user is asked if they are to be corrected. If a missing file is a directory, it will be created.  All
       errors and informational messages are logged to the file

       The utility uses when installing subsets to guarantee correct installation.

Options
       Specifying both options will cause the -y option to be ignored.

       -n     Error reporting only. When specified, reports errors and does not perform any fixes.

       -y     Fixes  only. When specified, fixes modes, UIDs and GIDs on any files which have incorrect values for these attributes. No user input
	      is required.

Restrictions
       Problems with file size, file type, and file checksum cannot be corrected.

       Because the subset inventories give file names as relative paths, run in the root directory to which the software is installed.

       Many of the files on the system cannot be read or modified without appropriate privilege. Attempting to run without  appropriate  privilege
       may result in an excess of access errors being reported.

Examples
       To use to report verification problems with the BASE subset on ULTRIX, Version 4.0 (VAX), use the following command:
       % cd /
       % /etc/stl/fverify -n </usr/etc/subsets/ULTBASE400.inv

       To correct all problems with the same subset without being presented any prompts or diagnostic output, type:
       % cd /
       % /etc/stl/fverify -y < /usr/etc/subsets/ULTBASE400.inv

       To  interactively  repair  verification	problems with the COMM subset on ULTRIX, Version 4.0 (RISC), use the fverify command with no argu-
       ments:
       % cd /
       % /etc/stl/fverify < /usr/etc/subsets/UDTCOMM400.inv

Diagnostics
       fverify: out of memory
       Not enough memory is available from the system.

       pathname: cannot stat (error-message)
       The file pathname is listed in the inventory but is not on the system.  The error-message explains why.

       pathname: file type `x' should be `y'
       The file is listed in the inventory as being of type `y', but the copy of the file on the disk is type `x'.  The file type codes are:

	      b  block device files
	      c  character device files
	      d  directory files
	      f  regular files
	      l  hard links
	      p  fifos (named pipes)
	      s  symbolic links

       pathname: checksum n should be m
       There is a checksum error on pathname.  The values n and m are the actual and expected values.

       pathname: size n should be m
       The size of file pathname is not as expected. The numbers n and m are the actual and expected values.

       pathname: gid n should be m
       The group id for pathname is not as expected. The group ids n and m are the actual and expected values.

       pathname: uid n should be m
       The user id for pathname is not as expected. The user ids n and m are the actual and expected values.

       pathname: permissions string1 should be string2
       The permissions for pathname are not as expected.  String1 and string2 are the actual and expected permissions. The format of  string1  and
       string2 is the same as that used by the command.

       Creating directory pathname
       The  directory  pathname  is listed in the input inventory but does not exist on the system.  The command will attempt to create the direc-
       tory.

       cannot correct pathname (error-message)
       A problem reported with pathname could not be corrected. The error-message explains why.

       pathname corrected
       A problem with pathname was successfully corrected.

       Cannot create dir pathname (error-message)
       The program could not create a directory it was attempting to create.  The accompanying error-message explains why.

       n verification errors encountered.
       m corrections performed.
       Before exiting, the program prints these statistics describing what had been done.

       The exit status from is the total number of errors detected minus the total number of successful fixes.

Files
       Subset inventory files

       Log File

See Also
       ls(1), stl_inv(5), setld(8)
       Guide to Preparing Software for Distribution on ULTRIX Systems

																	fverify(8)
All times are GMT -4. The time now is 01:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy