What language is this?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers What language is this?
# 1  
Old 12-10-2008
What language is this?

Hi,
Just got handed this script
Code:
set def = HLA_DR.pockets
set data = DRB1_1501.dat 

foreach a ( 'cat $data | args 3 |sort -u'  )

cat $def | xC | grep -v $a > $$.def
cat $data | grep $a | args 1,2 > $a.dat

set pseudo = `cat  MHCDR_pseudo.dat | grep HLA | grep $a | args 2`
pickpocket_mn -pow $p -p $pseudo -d $$.def > $a.mat
cl2pred -mat $a.mat $a.dat | xC > $a.pred
echo $a 'cat $a.pred | args 2,3 | xycorr | xC ' 

end

and it doesn't work just like that. Error message is: Unexpected '(' in line 4.
I'm guessing it's because I'm missing the
Code:
#! /usr/bin/.....

at the top of the file.

awk doesn't work. And it doesn't look like perl. I can't think of which language this is coded in but my knowledge is also very limited Smilie
Any help is much appreciated.Smilie
# 2  
Old 12-10-2008
it seems to be bash script for me
# 3  
Old 12-10-2008
Thanks again for the quick response once again.

So if I understood you correct, I have to write
Code:
#! /usr/bin/bash

at the top of the file?
And is there any restrictions on naming files? Or does the file have to be named file.bash?

Thanks again!
# 4  
Old 12-10-2008
Yeah!! It works!
Thanks for the help!
: )
# 5  
Old 12-10-2008
Quote:
Originally Posted by lost
Yeah!! It works!
Thanks for the help!
: )
good that you figured it out Smilie
# 6  
Old 12-10-2008
I don't think that is BASH (even though you said it works), it looks like csh. the "foreach a (...)" part gave it away for me, as there is a foreach in csh, but not in BASH.
# 7  
Old 12-10-2008
Agreed, looks like csh to me.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

C language help URGENT !!!

I'am writing a program in C language and my code is working perfectly i just need to add a search to it ... My code lets users add companies, and then display them on screen... i would like to add a search that allows user to type company name and then displayall its info on the screen !! THANK... (1 Reply)
Discussion started by: aloushi
1 Replies

2. HP-UX

How to know the default language in hp-ux?

hi every body i want to know how can i know the default language in the hp-ux like in solaris "US" please tell me wher is the file or the comand to tell me the language many thanks ---------- Post updated at 05:43 AM ---------- Previous update was at 05:05 AM ---------- crash:/#locale... (1 Reply)
Discussion started by: maxim42
1 Replies

3. Shell Programming and Scripting

New simple language

Hi all, I need to 'create' a new simple scripting language in order to allow SCADA operators make complex tasks against the system in an easy and friendly way. In other words I need to write mini modules with DB readings or writings, calculations, and so on, but these instructions must be written... (2 Replies)
Discussion started by: silex
2 Replies

4. Programming

which language will be the best

Hello, Ive got to amke a script to calculate how many emails are in the servers mailbox, how many times each IP address appears in the mailbox and to search for keywords, tehn produce the results in HTML report. The thing is I dont know where to start and what the best language to use would be. ... (4 Replies)
Discussion started by: clueless
4 Replies

5. Programming

c language

is there any difference between "char*" and "char *" (1 Reply)
Discussion started by: amol munde
1 Replies

6. Programming

c programming language

Can someone enligten me on what below program does? I understand getchar and putchar.. but what is this program suppose to do? I try to put printf on it, but it shows nothing.. can someone explain to me what this program is suppose to do? It is reading something and assigning to c? so, if... (8 Replies)
Discussion started by: convenientstore
8 Replies

7. UNIX for Dummies Questions & Answers

A different language to me!

Hi all, I'm glad there's a section called UNIX for dummies on this forum cause when it comes to UNIX, I am certainly a dummie. I honestly don't have a clue about 98% of the UNIX commands out there so forgive me if this is a really stupid question. I'm trying to set up a MySQL server on my Mac... (7 Replies)
Discussion started by: kguenther
7 Replies

8. Programming

GUI using C language

Hi friends I have my project based on C platform. I was supposed to develop a GUI. Can u pls suggest me the best way to develop the GUI. I heard that motif is the easy one to develop GUI applications. Pls help me out thanks in advance. (4 Replies)
Discussion started by: veeru554
4 Replies
Login or Register to Ask a Question