Sponsored Content
Top Forums Shell Programming and Scripting cat redirect EOF missing text Post 302422153 by aigles on Monday 17th of May 2010 03:21:49 PM
Old 05-17-2010
Variables are substitued inside HERE documents.
Try this :
Code:
cat > S99build << EOF
> #!/bin/bash
> case \$1 in
> 'start')
> /usr/os-buildsol.sh
>
> ;;
> esac
> exit 0
> EOF

Jean-Pierre.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using cat and grep to display missing records

Gentle Unix users, Can someone tell me how I can use a combination of the cat and grep command to display records that are in FileA but missing in FileB. cat FileA one line at a time and grep to see if it is in fileB. If it is ignore. If line is not in fileB display the line. Thanks in... (4 Replies)
Discussion started by: jxh461
4 Replies

2. UNIX for Dummies Questions & Answers

regarding cat and EOF in UNIX

Hi, Can anyone explain me what this function is doing cat << EOF > HELPFILE /$1/ { print "SENT" } EOF Thanks in Advance Suggestions welcome (1 Reply)
Discussion started by: trichyselva
1 Replies

3. Shell Programming and Scripting

redirect cat to variable

hello just i saw a really strange for cat i have file (file1) contains line /home/rajiv/proj1/*.txt now applied a commonds DDPATH="$(cat file1)" echo $DDPATH it shows all the txt files in that folder like /home/rajiv/proj1/read1.txt /home/rajiv/proj1/read2.txt... (7 Replies)
Discussion started by: shailesh_arya
7 Replies

4. Shell Programming and Scripting

Adding timestamp after cat <<EOF >

Hi Team, I am trying to add timestamp to SQLs by taking the timestamp in variable through shell script.I started like this. cat << EOF > $MYDIR CONNECT TO $MYDB USER $MYUSR USING $MYPWD; T=`db2 -x "select CURRENT_TIMESTAMP from sysibm.sysdummy1 "`; DECLARE RECCUR CURSOR FOR... (3 Replies)
Discussion started by: rocking77
3 Replies

5. UNIX for Dummies Questions & Answers

Copying text from Windows to AIX - missing text?

Hi All, I'm hoping this is an easy question, but I'm having a weird problem trying to simply copy and paste text from MS Windows (XP) Notepad and then pasting into vi or vim in AIX. When I type "oslevel" I get "5.3.0.0". The problem is that once the text is pasted, there are sections of text... (2 Replies)
Discussion started by: PlainInverted
2 Replies

6. Shell Programming and Scripting

What's wrong with my cat EOF?

cat << EOF > tmp.sh #!/bin/sh mknod /dev/`cat /proc/devices | grep xx | sed -r 's/(.*) (.*)/\2 c \1/'` 0 chmod 777 /dev/xx (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. UNIX for Dummies Questions & Answers

How to append a string by cat and redirect to other file?

Hi, when I do cat for kernel parameters cat /proc/sys/kernel/sem >> /etc/sysctl.conf 4096 4096 32 128 The above command working with out any doubt but I want to pass it like below, need to append "kernel.sem =" and pass it to /etc/sysctl.conf kernel.sem = 4096... (2 Replies)
Discussion started by: stew
2 Replies

8. Shell Programming and Scripting

Cat files listed in text file and redirect to new directory with same filename

I have a directory that is restricted and I cannot just copy the files need, but I can cat them and redirect them to a new directory. The files all have the date listed in them. If I perform a long listing and grep for the date (150620) I can redirect that output to a text file. Now I need to... (5 Replies)
Discussion started by: trigger467
5 Replies

9. Shell Programming and Scripting

How to redirect the output when we are usinf EOF in the same line?

need to login 4 systems to check whether the systems are accessible or not using rlogin command,after each login i will exit.After issuing the command rlogin abc if it is not responding i will get a message of "connection timed out" . So i want to automate this task .so i tried like below : EX:... (1 Reply)
Discussion started by: charanarjun
1 Replies

10. Shell Programming and Scripting

How To Redirect The Output When We Are Usinf EOF In The Same Line?

need to login 4 systems to check whether the systems are accessible or not using rlogin command,after each login i will exit.After issuing the command rlogin abc if it is not responding i will get a message of "connection timed out" . So i want to automate this task .so i tried like below: EX: ... (3 Replies)
Discussion started by: kankuro9x
3 Replies
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe [ name ... ] DESCRIPTION
The gzexe 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 ``gzexe /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
gzip(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
gzexe 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. GZEXE(1)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy