Sponsored Content
Full Discussion: Ignore garbage output file
Top Forums Shell Programming and Scripting Ignore garbage output file Post 302813691 by elixir_sinari on Tuesday 28th of May 2013 02:23:53 AM
Old 05-28-2013
Code:
sqlplus -s $UIDPSWD <<EOF >/projects/feeds/twest/result.txt

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing Garbage output

I am using following code to read myfile.ddl line by line. But the thing is it is printing lot of garbage which are the names of the files and directories in which myfile.ddl is present. Kindly refine the code so that only myfile.ddl contents are only read LOGFILE="logfile.txt"... (4 Replies)
Discussion started by: skyineyes
4 Replies

2. Shell Programming and Scripting

vi command -output garbage char in HP-UX

Hi all , I am new to HP-UX flavour of unix. i am issuing simple "vi" comand on the command prompt it is showing me some garbage character in command prompt itself ..unreadable format. I tried opening an existing file using the vi editor --and same thing ... (3 Replies)
Discussion started by: jambesh
3 Replies

3. Shell Programming and Scripting

reading from a file and pass as variables and ignore # in the file

file.txt contains ------------------ sat1 1300 #sat2 2400 sat3 sat4 500 sat5 I need to write a shell script that will output like the below #output sat1.ksh 1300 sat3.ksh sat4.ksh 500 sat5.ksh my try ------- (4 Replies)
Discussion started by: konark
4 Replies

4. Shell Programming and Scripting

Remove Garbage Output

Hello Friends, In a script i m using different temporary file and i remove them in the end. During script execution i have some garbage output which is not required. For example: Garbage Output ++ rm temp_out temp_a temp_b temp_c ++ rm Filter1 Filter2 Script : Even i am redirecting rm... (7 Replies)
Discussion started by: Danish Shakil
7 Replies

5. Shell Programming and Scripting

Help fix my garbage - File Split Program in Perl

Hi, I have the following, it doesn't work and I know it's crap code. The objective is to split a file with a givin number of codes such as: 01,02,03,...,99 Then return all records with each seperate identifier in a new file. The files being split have lrecl=500, recfm=F, and I... (4 Replies)
Discussion started by: mkastin
4 Replies

6. UNIX for Dummies Questions & Answers

getting garbage values in "df-k" output in solaris

Hi, I am running a command "df -k" to check the HDD utilization i am getting some garbage values in output of the command. Output coming Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t0d0s7 113197651... (0 Replies)
Discussion started by: varunksharma87
0 Replies

7. Shell Programming and Scripting

getting garbage in the output file of shell script

Hi Everyone, The problem is that I am getting messages other than the script in the current log file. Ideally the script should contain only the messages that are redirected to the log file. How to remove these unwanted data from the log file. Please help if you have any idea how to remove the... (0 Replies)
Discussion started by: vsachan
0 Replies

8. Shell Programming and Scripting

getting garbage in the output file of shell script

Hi, I wrote one shell script and I am calling 1 sql script inside shell script. When I am running the shell script, I am getting actual data as well as garbage data in the output file. Why the garbage is there in the log file. Please help if anybody having any ides. Script: ------- ... (2 Replies)
Discussion started by: vsachan
2 Replies

9. Red Hat

How to find a garbage entry in a column wise text file in Linux?

Suppose I have a file containing :- 1 Apple $50 2 Orange $30 3 Banana $10 4 Guava $25 5 Pine@apple $12 6 Strawberry $21 7 Grapes $12 In the 5th row, @ character inserted. I want through sort command or by any other way this row should either on top or bottom. By sort command garbage... (1 Reply)
Discussion started by: Dipankar Mitra
1 Replies
SCRIPT(1)						    BSD General Commands Manual 						 SCRIPT(1)

NAME
script -- make typescript of terminal session SYNOPSIS
script [-adfkpqr] [-F pipe] [-t time] [file [command ...]] DESCRIPTION
The script utility 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. If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell. The following options are available: -a Append the output to file or typescript, retaining the prior contents. -d When playing back a session with the -p flag, do not sleep between records when playing back a timestamped session. -F pipe Immediately flush output after each write. This will allow a user to create a named pipe using mkfifo(1) and another user may watch the live session using a utility like cat(1). -f Create file.filemon or typescript.filemon using filemon(4). -k Log keys sent to the program as well as output. -p Play back a session recorded with the -r flag in real time. -q Run in quiet mode, omit the start, stop and command status messages. -r Record a session with input, output, and timestamping. -t time Specify the interval at which the script output file will be flushed to disk, in seconds. A value of 0 causes script to flush after every character I/O event. The default interval is 30 seconds. The script ends when the forked shell (or command) 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. The script utility works best with commands that do not manipulate the screen. The results are meant to emulate a hardcopy terminal, not an addressable one. ENVIRONMENT
The following environment variables are utilized by script: SCRIPT The SCRIPT environment variable is added to the sub-shell. If SCRIPT already existed in the users environment, its value is overwrit- ten within the sub-shell. The value of SCRIPT is the name of the typescript file. 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), filemon(4) (for the history mechanism). HISTORY
The script command appeared in 3.0BSD. The -d, -p and -r options first appeared in NetBSD 2.0 and were ported to FreeBSD 9.2. BUGS
The script utility places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects. It is not possible to specify a command without also naming the script file because of argument parsing compatibility issues. When running in -k mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not work when the terminal is in a raw mode where the program being run is doing manual echo. If script reads zero bytes from the terminal, it switches to a mode when it only attempts to read once a second until there is data to read. This prevents script from spinning on zero-byte reads, but might cause a 1-second delay in processing of user input. BSD
December 4, 2013 BSD
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy