Sponsored Content
Top Forums Shell Programming and Scripting Help to write a script or program to automatic execute and link input file data Post 302477008 by perl_beginner on Friday 3rd of December 2010 04:26:34 AM
Old 12-03-2010
Help to write a script or program to automatic execute and link input file data

Output file template format
Code:
<input_file_name>a</input_file_name>
<total_length_size>b</total_length_size>
<log_10_length_size>c</log_10_length_size>

Input_file_1 (eg. sample.txt)
Code:
SDFSDGDGSFGRTREREYWW

Parameter:
a is equal to the input file name
b is equal to the total length of input file
c is equal to the log10 of total length of input file

Desired output file
Code:
<input_file_name>sample.txt</input_file_name>
<total_length_size>20</total_length_size>
<log_10_length_size>1.301029996</log_10_length_size>

I got a standard output file template format and plan to generate an output file based on the data detail from input file.
Because I got long list of different input file which shared the share output file template format.
Thus I plan to write a program or shell script to calculate and execute the data detail from input file and link the result to the output file template.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Urgent!! How to write a shell program to execute command to access internet?

hi, I am new ot unix. So, can i write a shell(c shell or korn shell) program to access internet? I mean if I run the program, it can access specified url and then copy the html to a file? Can anyone help me? And how can make the program runs every 1 hr? new comer (2 Replies)
Discussion started by: firebirdonfire
2 Replies

2. Shell Programming and Scripting

Pls Help-Script to execute Commands and write to excel file

Execute some commands in script and store result in excel sheet Kindly help me........... (1 Reply)
Discussion started by: Computer_baby
1 Replies

3. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

4. Shell Programming and Scripting

Write a new file from 2 files as input to the script

Hi- I am hoping someone can give me some pointers to get me started. I have a file which contains some dn's .e.g file 1 cn=bob,cn=user,dc=com cn=kev,cn=user,dc=com cn=john,cn=user,dc=com I have a second file e.g. file.template which looks something like :- dn: <dn> objectclass:... (5 Replies)
Discussion started by: sniper57
5 Replies

5. Shell Programming and Scripting

Need script to take input from file, match on it in file 2 and input data

All, I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then Insert file1 column2 to file2 column4 then create a new file. File1: 12345 Sam 12346 Bob 12347 Bill File2:... (1 Reply)
Discussion started by: darkoth
1 Replies

6. Shell Programming and Scripting

get data from input file and write another file

Hi, i have doubt in read and write using bash shell script... i will give the input file path and output file path in command line ex : example.sh iputfile outpilepath Here i need to read the input data then write that data to output file.. please give some example : (6 Replies)
Discussion started by: karthinvk
6 Replies

7. Shell Programming and Scripting

How to write shell script for input file name format checking?

Hello, I had written a shell script that accepts input file as cmd line argument and process this file. if ; then if ; then . $1 LOGFILE="$LOG_FILE/MIG_BIOS.log"; get_input_file else ERROR_CODE=MSCRM0005_003 error "$ERROR_CODE : Input file $1 is not available"; exit... (3 Replies)
Discussion started by: Poonamol
3 Replies

8. Shell Programming and Scripting

Unfold the data from a input file and write to a file

I am working on a script to unfold data for each column from a specific line of data and write output in a single line. Input data looks like this. 2011-09-26 INF UM_10 UserMana Starting synchronization for security domain 14:37:31 080 gementSe . rvice I... (2 Replies)
Discussion started by: svajhala
2 Replies

9. Shell Programming and Scripting

Read user input, Encrypt the data and write to file

Hi, can some one help me how to encrypt and decrypt a file. AIM: reade user input, encrypt it and save it to file. while decryption read the encrypted file decrypt it and save the output in some variable. Example: consider we have Credentials.txt file with content username: password... (5 Replies)
Discussion started by: saichand1985
5 Replies

10. Shell Programming and Scripting

Write a shell program with input

Hi, Here is my question: I want a shell script which I name as 'del', and can be used as del(string). when run del(string), it will delete several directories at different locations in my system,like: rm -fr /lustre/fs/scratch/user/$string rm -fr /home/user/$string rm -fr... (4 Replies)
Discussion started by: 1988PF
4 Replies
MINCCONVERT(1)							 MINC User's Guide						    MINCCONVERT(1)

NAME
mincconvert - convert between MINC 1 to MINC 2 format. SYNOPSIS
mincconvert [-clobber] [-2] infile outfile mincconvert -help DESCRIPTION
mincconvert copies the input file to the output file, possibly converting the file from MINC 1 to MINC 2 format, or vice versa. With the -template flag, mincconvert creates a "template" volume from the input MINC volume. The template volume preserves all of the structure (dimensions, variables, and attributes) of the input MINC volume but omits all data. Any attempt to read data will return zeroes. The resulting file is typically much shorter than a normal MINC volume, and may be useful for scripts which want to carry such structural information forward into their output files. As a hint to future programmers and users, this program places a special global attribute in the file, with the name class and the value template. OPTIONS
-2 Create a MINC 2 format file -clobber Overwrite a pre-existing output file. -help Print a summary of command line options and exit -template Create a template file. -compress N Compress file with compression level N. Valid compression levels are 0 for no compression to 9 for maximum compression. The option has no effect if the output file is a MINC 1 file. -chunk M Store file in a block-structured arrangement, using hypercubes of edge length M. The option has no effect if the output file is a MINC 1 file. -help Print summary of command-line options and exit. -version Print the program's version number and exit. AUTHOR
Bert Vincent - bert@bic.mni.mcgill.ca COPYRIGHTS
Copyright (C) 2003 by Robert Vincent and the Montreal Neurological Institute. $Date: 2004-05-20 21:52:08 $ MINCCONVERT(1)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy