Sponsored Content
Full Discussion: Spot the difference
Top Forums Shell Programming and Scripting Spot the difference Post 302082451 by Dim-Wit on Wednesday 2nd of August 2006 10:16:27 AM
Old 08-02-2006
Hi, thanks for your help earlier, to my understanding this code looks like it should work and I'm very excited about it but the damn thing says the end of line 27 is unexpected, please help!

#!/bin/sh
case $# in
0) echo "Usage: enshar file [ ... ]" >&2
exit 1
;;
*) for file
do
if [ -d $file ]
then echo "enshar: $file is a directory" >&2
exit 3
elif [ ! -f $file ]
then echo "enshar: $file doesn't exist" >&2
exit 4
elif [ ! -r $file ]
then echo "enshar: $file can't be read" >&2
exit 5
elif [ -h $file ]
then echo "enshar: $file can't enshar" >&2
exit 6
else
echo "cat > $file <<\!EnShAr!\"
echo "!EnShAr!"
echo "set 'cksum $file'"
echo"cksum" $file
check=$1
echo "test $1 = $check || echo $0: bad cksum in $file >&2 " >> shar
echo "cat > $file <<\!EnShAr!" >> shar
fi
done
;;
esac

p.s, where should the "fi" be, thanks for any help
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Spot

does somebody know about SPOT ?? any link about SPOT commands ? i ve made a mistake during configuration, :mad: then i ve started the system in Maintenance mode the only shell was SPOT. :eek: SPOT doesn t understand anything.... how do i work with SPOT ? thanks in advance Karine... :D (1 Reply)
Discussion started by: karine
1 Replies

2. AIX

SPOT requirement

Hey May be a dumb question Can I use a SPOT which is at 5.3 TL6 to boot an LPAR (with 5.3 TL8) in to maintenance mode? Will it work ? Is it mandatory that SPOT should be of same or higher version in such case? Bala (1 Reply)
Discussion started by: balaji_prk
1 Replies

3. Shell Programming and Scripting

How do I search with regex in one spot?

Hello im new here and i shot stright with question. Mainly i wanna ask , how do i search with regexp in one spot and show the whole thing, what im trying to ask is , for eg. i do ls -l, and i see all the info for the dirs and dats. now say i wanna get all the dats that in their name they start... (2 Replies)
Discussion started by: Goroner
2 Replies

4. AIX

how to make a spot

HI. there My 10 servers are running on 6.1-05-03 aix including NIM server but my user want to update a TL (61-05-03 to 61-06-04) if I Update a AIx version of TL .. is that change the SPOT of NIM server.. OR if I make a spot of AIX7.1 and Is that support AIX 6.1 AIX 5.3 Images I... (1 Reply)
Discussion started by: Jeon Jun Seok
1 Replies

5. AIX

NIM SPOT query

Dear Admins, The SPOT defined in NIM is for aix 5.3 TL 7 . Some of the NIM clients are upgraded to TL 10 . Now the SPOT level is older than the mksysb level. This will cause problem during restoration of any NIM clients. Now i want to upgrade SPOT level to TL 10 and redefine the resources... (3 Replies)
Discussion started by: newaix
3 Replies

6. UNIX for Dummies Questions & Answers

Can anyone help me to spot my mistake?

Hi there can anyone help me to spot my mistake and please explain why it appears My code : #!/usr/bin/gawk -f BEGIN { bytes =0} { temp=$(grep "datafeed\.php" | cut -d" " -f8) bytes += temp} END { printf "Number of bytes: %d\n", bytes } when I am running ./q411 an411 an411: ... (6 Replies)
Discussion started by: FUTURE_EINSTEIN
6 Replies

7. AIX

Unable to create a SPOT

Hi everyone! Ok so I'm trying for the first time to install AIX on a LPAR with NIM. The NIM: root@oaexpnimp01(/home/root) # oslevel -s 6100-08-02-1316 I'm trying to install AIX 6.1 TL1. I successfully created a new lpp source root@oaexpnimp01(/home/root) # lsnim -l AIX61_TL1_2... (10 Replies)
Discussion started by: trivium012
10 Replies
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy