01-08-2010
You are missing a dash '-' (No the dash doesnt matter, cat << EOF and cat <<-EOF are the same.).
its cat <<-EOF
...
<your stuff here>
...
EOF
Quote:
Originally Posted by
isaacsam
Given below is the code that i am trying to execute .
And it will just echo the your stuff to the terminal.
Last edited by ni2; 01-08-2010 at 07:50 AM..
Reason: opps, my mistake.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
How do I format the following?
I have a for loop that retrieves me the path and file name of a file. In column fashion I would like to add the time and another variable containing the file's size. This will result in all the time being under each other and all the file size's being under... (6 Replies)
Discussion started by: hugow
6 Replies
2. UNIX for Dummies Questions & Answers
Using a for loop I am able to get the following log file below. I would like o change the format a bit as is indicated lower down. I have looked at awk and sed but somehow is not getting any joy. I am a bit new to ksh scripting. Please assist.
This is the format of my current log file after the... (1 Reply)
Discussion started by: hugow
1 Replies
3. Forum Support Area for Unregistered Users & Account Problems
We use AIX mailx or sendmail. How can I format a text file so that lotus notes users can see diferent fonts and highlighting. Or can a gif file (company logo..) be sent along with a text file and the Lotus notes user would see the logo and text displayed at the same time and not as an attachment? (0 Replies)
Discussion started by: lidoiwo
0 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Im trying to find and replace text within a unix file using sed.
The command that i have been using is
sed '/,null,/ s//, ,/g' result.txt>result.tmp
for replacing ",null," with ", ,".
But this only replaces the first occurrance of ,null, in every line. I want to do it globally.
It... (7 Replies)
Discussion started by: sohaibs
7 Replies
5. Shell Programming and Scripting
Dear All
I am facing problem while extracting data from below mention input file.
My op should be like this.Required field display in red in file.
Request you all to help.
OP:
RXOTX-46-5 1B4
RXOTX-46-4 2B5
INPUT FILE:
<RXMFP:MO=RXOTX-46-5;
RADIO X-CEIVER ADMINISTRATION... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies
6. Shell Programming and Scripting
Dear all
I had input file as mention below and want op as mention.
Kindly let me knw possible ways.
Regards
Jaydeep
INPUT:
RXOTX-48-1
2A 34
2B 35
RXOTX-499-2
2C 32
RXOTX-4-1
2D 23
OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies
7. Shell Programming and Scripting
Hi Experts,
I have a text exactly like below in a file:
id item_id
item_date prin_mkt_val
--------------------------- ---------------------------
------------------------------- ------------------------
... (1 Reply)
Discussion started by: apatil65
1 Replies
8. Shell Programming and Scripting
I created one file on windows system and is visible as :
TestTable,INSERT,večilnin1ईगल受害者是第,2010-02-02 10:10:10.612447,137277,ईगल受害者是第večilnin!@#$%^&*()_+=-{}]
But when send this file to unix system, the file is visible as :
TestTable,INSERT,žvečilnin1ई-ल -害...是第,2010-02-02 ... (4 Replies)
Discussion started by: Shaishav Shah
4 Replies
9. UNIX for Dummies Questions & Answers
Hi, I wanted to select the text in gvim using mouse for coping. some times it works fine and full text will be selected and copied to clipboard if it is like shown in first fig. Paste of the copied text can be done by clicking the middle mouse button.
But some times the text will be selected as... (2 Replies)
Discussion started by: twistedpair
2 Replies
LEARN ABOUT NETBSD
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-adfpqr] [-c command] [file]
DESCRIPTION
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Option:
-a Append the output to file or typescript, retaining the prior contents.
-c command
Run the named command instead of the shell. Useful for capturing the output of a program that behaves differently when associated
with a tty.
-d When playing back a session with the -p flag, don't sleep between records when playing back a timestamped session.
-f Flush output after each write. This is useful for watching the script output in real time.
-p Play back a session recorded with the -r flag in real time.
-q Be quiet, and don't output started and ended lines.
-r Record a session with input, output, and timestamping.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is used by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism).
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
BSD
October 17, 2009 BSD