ive implemented getopt for the command line but have this problem,
#!/bin/sh
text=""
set -- getopt "t" etc .... #sets arguments
while :
do
case "$1" in #gets arguments
-t: shift; text="$1" ;;
shift
done
shift
if
then
echo "no text"
else
echo... (4 Replies)
Hi,
I am running a .csh shell and get this error.
set dir=/u21/oradata/SDE/cass
echo /u21/oradata/SDE/cass
/u21/oradata/SDE/cass
set compression=jpeg
set bustab=CASS_ORTHO2005
set keyword=cnty_2005
set resampling=bilinear
set image_list=/u21/oradata/SDE/cass/*.tif
Arguments too long.... (0 Replies)
I am getting a :; then
echo "Enter zero or one file"
echo "You must use a valid directory"
echo "Current directory is:" pwd
exit 0
fi
#Flag Variable
flag=1
#Code for no arguments
if ; then
for filename in *
do
if ; then
... (2 Replies)
Hi,
When i am running the following script 1.sh (without giving the command line arguments) then i am getting the following error.
if
then
echo "UID and PWD are correct"
elif
then
echo "Either UID or PWD is wrong. Please check your UID and PWD"
else
echo "UID and PWD can't be blank"... (9 Replies)
#include <pthread.h>
#include <signal.h>
...
sigset_t mask;
int err,signo;
err=sigwait(&mask,&signo);
switch(signo){
case SIGINT:
...
}
when I compile above code under solaris 10,it raise following error:
error: too many arguments to function 'sigwait'
I look up signal... (4 Replies)
I need help. I have created my script for a simple calculator but my multiplication operator does not work. This is the the code:
#!/bin/bash
echo "Enter number1"
read Number1
echo"Enter number2"
read Number2
echo"Operator is *"
read opr
if
then
expr $Number1 \*... (1 Reply)
Hello, I've got this little script that gets a bunch of comics and puts them in an html file. However, when I check that the comic URL is there and that it's a new one, I get the "too many arguments" error. The script is this:
CADURL=`curl --silent http://www.cad-comic.com/cad/ | grep -o... (10 Replies)
Hi,
i have a file.txt with data
Bangalore
Chennai
Hyd
filename of the script is: new.sh
result=`cat file.txt | grep $1`
if
then
echo pass
else
echo fail
fi
i am executing the file in the cmd line as "sh new.sh Bangalore"
o/p is pass
if i give "sh new.sh delhi"
o/p is... (6 Replies)
Hi,
I am getting the below error
: error at the if condition start and when I print the
value of TEST, it displays two values as below
/home/xyz/out/file1.txt
/home/xyz/out/file2.txt
if ; then
mv $TEST $TARGETDIR/
fi
Tried by enclosing it in double quotes "$TEST",... (4 Replies)
kindly some one pls let me know what is the prb with the code. tired of debugging. psl let me know the details on resolution
#!/bin/bash
echo enter name
read name
if || ] ; then
echo $name
else
echo none
fi (4 Replies)
Discussion started by: anandpasunoori
4 Replies
LEARN ABOUT OSX
fetch
FETCH(9) BSD Kernel Developer's Manual FETCH(9)NAME
fetch, fubyte, fuibyte, fuiword, fulong, fuulong, fuword -- fetch data from user-space
SYNOPSIS
#include <sys/types.h>
#include <sys/time.h>
#include <sys/systm.h>
#include <sys/resourcevar.h>
int
fubyte(const user_addr_t addr);
int
fuibyte(const user_addr_t addr);
int
fuiword(user_addr_t addr);
int64_t
fulong(user_addr_t addr);
uint64_t
fuulong(user_addr_t addr);
int
fuword(user_addr_t addr);
DESCRIPTION
The fetch functions are designed to copy small amounts of data from user-space.
The fetch routines provide the following functionality:
fubyte() Fetches a byte of data from the user-space address addr.
fuibyte() Fetches a byte of data from the user-space address addr. This function is safe to call during an interrupt context.
fuiword() Fetches a word of data from the user-space address addr. This function is safe to call during an interrupt context.
fulong() Fetches a long word of data from the user-space address addr.
fuulong() Fetches a unsigned long word of data from the user-space address addr.
fuword() Fetches a word of data from the user-space address addr.
RETURN VALUES
The fetch functions return the data fetched or -1 on failure.
SEE ALSO copy(9), store(9)BSD December 16, 2004 BSD