A here document is a good alternative because it takes the text as is
It copies the next lines until the _EOT marker is found at the beginning of the line. (Any unique word can be used as an end marker.)
This will substitute a $variable by its value (like in echo "$variable").
If the opening marker is in quotes cat << "_EOT" it will NOT replace a $variable by its value.
This User Gave Thanks to MadeInGermany For This Post:
Hi, I am trying to write a csh script that will run another csh script, but redirect the output from the second script to an email. my code looks like this.
#!/bin/csh
## This script is designed to run the SSM.sh
## then email the output to a specified email address
## it will also display... (2 Replies)
Hi everyone.
I am new to the forums and new to Unix, so please pardon my beginner "status".
In my company, we have a few C shell scripts, which we call BAT files (!). They all start with the usual "#/bin/csh" line to get it to run the .cshrc script which preloads the session with a lot of... (1 Reply)
I mean this :
perl -pi -e 's/OS/blah/g' *.c*
The Great thing in such thing i dont need to rename orig then rename back when i do it with
sed for instance inside csh shell , is there any way to avoid this with sed/awk/what ever?
Thanks (4 Replies)
I am trying to use echo in CSH and getting an error.
I want to use to tell the user which parameters are optional.
set msg2 = " -Inmod= -Nxz= -Varp="
echo $msg2 (3 Replies)
I get a "command not found" error when I run the csh command. I also get this error when I start a new session since my default shell is c shell. Any pointers as to what is going on?
I am trying to set some paths using the .cshrc file and need to use the csh command for this.
Thanks. (1 Reply)
Hi All,
I need your hand to resolve an issue I am facing with a join command in one of the script. Please see the 3 files attached where file1 and file2 are the two files I am passing to the join command written in the command file. Prior to calling the join I am also sorting both the files on... (6 Replies)
HI ,
I am new to csh. I need to pass some command line arguments like
./abc.sh -os Linux -path abc -tl aa -PILX 1
I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as arguments.
How to resolve it?
while ( $#argv != 0 )
switch ($argv)
... (7 Replies)
HI, guys, I am having some problem with the echo command, so I want to echo some text to a file name loginFile, the result inside the loginFile should looks like:
expect ">"
so what I did is:
echo "expect "">""" >> $loginFile
but it just gave out:
expect >
The thing is I still need... (2 Replies)
Hello,
I have written a command n shell script :
srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f
If the above command executes successfully without error I need to echo
"Service relocated successfully
and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
hi everyone
what is difference between "if ( -e Arch )" and "if ( -e ./Arch )" in csh shell?
Many Thanks
samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
LEARN ABOUT LINUX
bzexe
BZEXE(1) General Commands Manual BZEXE(1)NAME
bzexe - compress executable files in place
SYNOPSIS
bzexe [ name ... ]
DESCRIPTION
The bzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a
penalty in performance). For example if you execute ``bzexe /bin/cat'' it will create the following two files:
-r-xr-xr-x 1 root bin 9644 Feb 11 11:16 /bin/cat
-r-xr-xr-x 1 bin bin 24576 Nov 23 13:21 /bin/cat~
/bin/cat~ is the original file and /bin/cat is the self-uncompressing executable file. You can remove /bin/cat~ once you are sure that
/bin/cat works properly.
This utility is most useful on systems with very small disks.
OPTIONS -d Decompress the given executables instead of compressing them.
SEE ALSO bzip2(1), znew(1), zmore(1), zcmp(1), zforce(1)CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the
PATH environment variable to find gzip and some other utilities (tail, chmod, ln, sleep).
BUGS
bzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases,
using chmod or chown.
BZEXE(1)