473,324 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Multiple commands in csh one liner if

Hello All.
I hope I am asking this question in the right section of the site.

I'm working on Solaris 10 and the shell is csh. My intent is to perform 2 tasks if a condition is not satisfied. I'm using the one liner syntax for if (one liner because I need to use this as an alias later). However, my observation is that this simply does not work:
Expand|Select|Wrap|Line Numbers
  1. if ( 0 != 1 ) (echo Message1; echo Message2;)
  2.  
All I see is:
Expand|Select|Wrap|Line Numbers
  1. (: Command not found
  2.  
Can anyone kindly help me identify my mistake and get it to echo those 2 messages?

Thanks in advance,
Parag Doke
Dec 8 '10 #1
2 4795
I tried: (in bash)

if [ "0" != "1" ]; then (echo $mess1; echo $mess2); fi

where mess1|2 are some variables.
Dec 8 '10 #2
Hello Tin.
Thank you for your reply. However, I was looking for a csh solution (since I want to attempt this via an alias).

Thanks in advance!
Parag Doke
Dec 10 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Bruce A. Julseth | last post by:
In my PHP code, I want to execute the following two commands: use mydb; select * from mytbl; Now, I can get it work with the following statements: $SQL = "use mydb"; $result = ...
1
by: Roy G. Vervoort | last post by:
Is it possible to put several commands in the onmouseout command I'm having several links each with its own ID (roll1, roll2, roll3, etc) and i would like all to change on the OnMouseOver command...
0
by: Dobsons | last post by:
What can I do to make this series run as like an executable? (I type in the file name and it runs these 9 mysqlimport commands) mysqlimport -df --fields-enclosed-by='"' --fields-terminated-by=, R...
8
by: Peter A. Schott | last post by:
Per subject - I realize I can copy/paste a line at a time into an interactive session when I'm trying to debug, but was wondering if there is any tool out there that allows me to copy sections of...
0
by: rhj4 | last post by:
I need to have two command links/buttons in each row of a gridview (see code below). They both go to the same "OnSelectedIndexChanged" event. How do I tell which was clicked? Thanks, Bob Jones...
1
by: deja.10.thrillho | last post by:
I am try to create a procedure that does inserts and returns a command: DELIMITER $$ DROP PROCEDURE IF EXISTS `testDB`.`insmod` $$ CREATE PROCEDURE `insmod`( _name VARCHAR(50) ,_description...
1
by: stemp1ar | last post by:
I am wondering if it possible to open a single process and run multiple commands on that process and check standard error and standard out after each command? Has anyone done something similar...
1
by: aberk | last post by:
I am using VB 2005 and trying to send mutliple AT commands to a serial device. I need to wait for a response from the unit and possibly do something with the response before proceeding to the next...
3
by: andersond | last post by:
I have a website application that provides online quotes for insurance. I want the application to send an email to the agent when they have requested binding AND execute a branch to the next CGI...
8
by: rsm06 | last post by:
Example: I run a perl script from my c:\ the command I want to run is first change directory from C:\ to z: then in Z: I want to run the dir command and performs some more commands (example...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.