02-20-2015
Help with file generation
Dear all
Hope you are doing good.
I've requirement where in I need to generate a file containing set of SQLs as per the inputs.
My script flow is like reading few parameters using read command to read input to script and process the inputs. However at one of the input, my script has to take input as huge number of lines (lines will be DDL of create table statement with special characters like single quotes). I'm getting these lines in text file and copying them and giving it as input to script by right clicking mouse in putty session. The moment I do the right click, my script is failing.
Please advise on how to handle this. The DDL statements will be received via text file
Thank you all in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm very new to unix. I need help in writing a shell script that will automatically take output file from a particular folder from a server and if the file is generated send email notifications to certain group of ppl and if it is not generated send a mail wid error msg..
can any1 help me on... (2 Replies)
Discussion started by: anzie.sharma
2 Replies
2. Shell Programming and Scripting
I'm very new to unix. I need help in writing a shell script that will automatically take output file from a particular folder from a server and if the file is generated send email notifications to certain group of ppl and if it is not generated send a mail wid error msg..
can any1 help me on... (4 Replies)
Discussion started by: anzie.sharma
4 Replies
3. Shell Programming and Scripting
hi all
i need to generate a report file that contains the following details of files present in a directory.
1. File name
2.Complete path for each files and directory
3.File size
4.Days older
example i have a directory testing that contains sub-directories and some files.
i need to make a... (5 Replies)
Discussion started by: yashwantkumar
5 Replies
4. Shell Programming and Scripting
Hi,
I wanted to create a control file with data in it.
Also wanted to append more points like
1)Row count, then print the first field
2)first line of the file
3)last line of the file
I started with this:-
ls -ltr *.*| awk ' { print $9 "|" $7 $6 $8 "|" $5 } '
sed -n '1p';
sed -n '$p';
... (2 Replies)
Discussion started by: alokbaba
2 Replies
5. Shell Programming and Scripting
I have a pipe delimited file (|) with 3 columns
Already i have values for 21000 records.
Eg:- A|B|C
EUFG|22|234
SDFG|34|345
Now i have to replace the first column A values with unique values without affecting column B and C
for all the 21000 records i need to change the... (2 Replies)
Discussion started by: raakesh88
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have hit a bit of a brick wall.:confused:
need the following code edited:
echo "<?xml version=\"1.0\"?><dailyBalance_ROWSET>" > ${DataDir}/${extract_script}${ApplicationDate}.${Suffix}
RunSQL ${extract_script} ${ActionFlag}
echo "</dailyBalance_ROWSET>" >>... (2 Replies)
Discussion started by: Xergxes7
2 Replies
7. Shell Programming and Scripting
I have to generate the file dynamically from the source file based on the below control file.
control_file.txt
1,3,5,-1,8,-1,4
The control file contain the position of column which i required from the source file, Example 1 column ,3 column ,5 column ,blank column(-1 indicates blank... (2 Replies)
Discussion started by: rspwilliam
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Like to enquire whether is it possible for me to append another log file(log2.lst) using my below crontab? I will need to have 2 log files generated; one to collect the daily appended output and another log file that contains only the daily output.
Original Code:
00 01 * * *... (2 Replies)
Discussion started by: snowfrost88
2 Replies
9. UNIX for Dummies Questions & Answers
Hi
I am using Linux and I am using Java as well as C++ services running on it.
The ulimit -c is set to around 400Mb.
Whenever any of the service fails they produce a core file.(Actual size of core could be greater than 400Mb).
Whenever my Java service fails I get a core file of size 400Mb... (3 Replies)
Discussion started by: Raj999
3 Replies
10. Shell Programming and Scripting
Hi Team,
Is it possible to generate the xls OR xlsx file factility in Unix and xls file should be more than one sheet. (2 Replies)
Discussion started by: bmk123
2 Replies
LEARN ABOUT OPENDARWIN
tclsh8.4
tclsh(1) Tcl Applications tclsh(1)
__________________________________________________________________________________________________________________________________________________
NAME
tclsh - Simple shell containing Tcl interpreter
SYNOPSIS
tclsh ?fileName arg arg ...?
_________________________________________________________________
DESCRIPTION
Tclsh is a shell-like application that reads Tcl commands from its standard input or from a file and evaluates them. If invoked with no
arguments then it runs interactively, reading Tcl commands from standard input and printing command results and error messages to standard
output. It runs until the exit command is invoked or until it reaches end-of-file on its standard input. If there exists a file .tclshrc
(or tclshrc.tcl on the Windows platforms) in the home directory of the user, tclsh evaluates the file as a Tcl script just before reading
the first command from standard input.
SCRIPT FILES
If tclsh is invoked with arguments then the first argument is the name of a script file and any additional arguments are made available to
the script as variables (see below). Instead of reading commands from standard input tclsh will read Tcl commands from the named file;
tclsh will exit when it reaches the end of the file. The end of the file may be marked either by the physical end of the medium, or by the |
character, '