Dynamically Creating and Printing to Files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Dynamically Creating and Printing to Files
# 1  
Old 03-02-2005
Dynamically Creating and Printing to Files

Hello,

If anyone could help me out with this, it would be greatly appreciated. I am trying to dynamically create files and print to them.
Here is the code I have to so far. thanks.


if (n < 5000 )
{
# do nothing
}
else
{
n = 0;
filenum++;
# out = ("out" filenum);
}

#Print out the xml to the standard output

printf(" <Account>\n") >> out; # out should be a variable and a new file should be created and output to when the name of this variable changes. thanks
# 2  
Old 03-18-2009
Please be more specific. Your example makes no sense
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating IN list in PLSQL script dynamically by using shell script

Hi all, I have a PLSQL script which has a IN list where it takes some ids as input. For example SELECT * FROM EMPLOYEE WHERE EMPLOYEE_ID IN (comma separated list ) I want to run this quest inside a shell script but I would like to prepare the IN list dynamically where the employee ids... (1 Reply)
Discussion started by: LoneRanger
1 Replies

2. Shell Programming and Scripting

Dynamically creating file names from portions of another file name

Not sure how to do the following, but any help would be appreciated. Has to be done using C shell (sorry about that). I have about 300 files that I need this done for, but I am only going to give one example. I will just need to know how to execute your solution through some type of loop to get... (2 Replies)
Discussion started by: jclanc8
2 Replies

3. Programming

Dynamically creating structure in C/C++ program

Hi, For one of the project which i am working on i need to write a cpp code such that it will create the structure dynamically instead of reading it from header file. For example we have a program which is reading a binary file according to the structure mentioned in header file. But we... (0 Replies)
Discussion started by: AmbikaValagonda
0 Replies

4. Shell Programming and Scripting

Creating Printing Program in bash

HI I am trying to create a bash script to print whatever i type in It has to have these below to define the size of the label and what size to print the text N q609 A100,10,0,5,2,2,N," " P1 It has to be sent to below > /dev/usblp0 So what it has to be is Written... (12 Replies)
Discussion started by: bganse
12 Replies

5. Shell Programming and Scripting

Creating variables dynamically and using it in script?

Hi, I have a problem that I am trying to solve and would greatly appreciate some input to solve this. I have a file containing variable length of line. Each line in the file has values separated by "," and i need to grep for these values in a some files. For example below is a sample file with 3... (12 Replies)
Discussion started by: davidtd
12 Replies

6. Shell Programming and Scripting

how to create the files dynamically in c shell script

how can i CREATE a txt file dynamically in c shell: for instance: #! /bin/csh for each i (*) cat>file$i.txt for each j do .... (1 Reply)
Discussion started by: jdsignature88
1 Replies

7. Shell Programming and Scripting

Dynamically creating text files using shell script

Hi All, I want to create a shell script which dynamically create text files. i am using the following script $i=1 while do cat > test_$i.txt done but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

8. Shell Programming and Scripting

copy files dynamically from within a file

Hello All, I am given a file in which there are all the library files: lib.txt: /home/xyz/lib/*.jar /home/abc/java/*.jar /home/def/lib/a.jar /home/def/lib/b.jar ... My script should copy these files within lib.txt to current directory script: cd /home/$APP Please help. chiru (1 Reply)
Discussion started by: chiru_h
1 Replies

9. Shell Programming and Scripting

Creating a line for printing

Hi All I need to create a report and need some help on the formating side. In this report, I gather information from 2 different files and produce the line. I was looking at having a variable for the full lenght of the line with spaces and using the substr to put the right fields in place. Is... (3 Replies)
Discussion started by: jhansrod
3 Replies

10. Shell Programming and Scripting

dynamically creating a variable name

Hi ! I have the following situation - ##First variable variableA=JOB_A ##bunch of other variable JOB_A_RESTART=cleanupJobA JOB_B_RESTART=cleanupJobB JOB_C_RESTART=cleanupJobC now i need a script which would - 1. take the first variable 2. create a new variable name... (2 Replies)
Discussion started by: hsahay
2 Replies
Login or Register to Ask a Question