Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Modifying from borne shell to C shell Post 2180 by zenkisoft on Wednesday 25th of April 2001 09:56:20 PM
Old 04-25-2001
Data

Just want to know a few conversion tricks.

in Borne Shell, I have the line:

if test -s testmap
then
...
fi
## testmap is a filename and I wanna test whether it exists
## then do whatever
How can I convert that to C Shell?
I've tried:
if (test -s testmap) then
...
endif
but it doesn't work. Says if: invalid expression.

Also, in Borne Shell, if I run a program called 'agent' in the background by typing in:
agent &
And it's process ID is stored in the variable $! and I can actually print it in Borne Shell.

But it seems that $! doesn't exists at all in C Shell. How can I do the similar thing in C Shell?

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can there be multi-dimensional variable arrays in borne shell?

Hello - I've serached the web but can't find much on array script variables (except that C-shell variables are arrays!) I'm trying to form a 2-D string array: (this is what I want, but in java) String list = { {"one", "two"}, {"three"} }; I know this is a 1-D string array shell... (4 Replies)
Discussion started by: jparker
4 Replies

2. UNIX for Dummies Questions & Answers

Need Help With My First Borne Shell Program

I'm working on writing my very first borne shell program and I need some help. I think I'm pretty close to having this correct but I may be off. I think my actual program is coded correctly but the commands I use within it I think are what's throwing it off? **Purpose of the program: To... (3 Replies)
Discussion started by: FuzzyNips
3 Replies

3. Shell Programming and Scripting

modifying my shell

Hello, I have installed a new program called chimera under the directory /usr/local/bin/chimera. the executable is under the directory /usr/local/bin/chimera/bin/chimera.e If i put myself under the latest directiry and I type ./chimera, the program works. I would like to avoid this and I... (1 Reply)
Discussion started by: nico-hellas
1 Replies

4. Shell Programming and Scripting

UNIX Find command in Borne Shell

I need to perform two separate commands as part of the -exec section of a find command. Is this possible? (1 Reply)
Discussion started by: marshaferry
1 Replies

5. Shell Programming and Scripting

Documenattion on Borne And C shell programming

Hi experts, I am new bee in unix programming. How to differenciate a Borne and C shell programming. Can i write a C shell syntax in Borne again shell. Please send me the good links on Borne and Cshell programming . Any help in this regard will be highly appreciated. Regards, Azaz. (3 Replies)
Discussion started by: azazalis
3 Replies

6. UNIX for Dummies Questions & Answers

borne shell script

I need anwser to this qestion! I havewirte a script that provides line numbered contents of a file which must make use of the following control structures files Command line arguments I am a complete new commer to unix and bourne shell scripting can any one help (1 Reply)
Discussion started by: migg-21
1 Replies

7. UNIX for Dummies Questions & Answers

Modifying a shell script without using an editor

Hi all, I really wan't to know that how to edit a shell script with out using an editor.. Is there any command? (4 Replies)
Discussion started by: buddhi
4 Replies

8. Shell Programming and Scripting

Modifying contents of the file in shell script

Hello all, I have a Kconfig file that looks like something below ... ================================ menu "Application type" config GUI_TYPE_STANDARD bool "Standard Application" source "cfg/config/std.in" source... (12 Replies)
Discussion started by: anand.shah
12 Replies

9. Shell Programming and Scripting

Modifying the shell script to select pattern

Hello, I have script which work 70% of the desired task , the output from script.sh is following , however the desired output I require is following . Any piece of suggestion would be great.. thanks in advance, emily #!/bin/bash ... (8 Replies)
Discussion started by: emily
8 Replies

10. Shell Programming and Scripting

I am getting strange message when run borne shell script

I have a code: if then#{ process daily files for file in *_${Today}*.csv *_${Today}*.txt do if || then echo "This file will be processed in separate script" continue fi if ;then ... (2 Replies)
Discussion started by: digioleg54
2 Replies
CPANPLUS::Shell::Default::Plugins::Source(3pm)		 Perl Programmers Reference Guide	    CPANPLUS::Shell::Default::Plugins::Source(3pm)

NAME
CPANPLUS::Shell::Default::Plugins::Source - read in CPANPLUS commands SYNOPSIS
CPAN Terminal> /source /tmp/list_of_commands /tmp/more_commands DESCRIPTION
This is a "CPANPLUS::Shell::Default" plugin that works just like your unix shells source(1) command; it reads in a file that has commands in it to execute, and then executes them. A sample file might look like this: # first, update all the source files x --update_source # find all of my modules that are on the CPAN # test them, and store the error log a ^KANE$' t * p /home/kane/cpan-autotest/log # and inform us we're good to go ! print "Autotest complete, log stored; please enter your commands!" Note how empty lines, and lines starting with a '#' are being skipped in the execution. BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::Shell, cpanp perl v5.16.2 2012-10-11 CPANPLUS::Shell::Default::Plugins::Source(3pm)
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy