Please help on how to create files from contents of a text file??? whats the best approach
Hi so far I created this script:
Code:
vi loop.beta.sh
for i in `cat extract.filenames.tabc`
do
echo $i
done>$i
===
This is the original text file.
Code:
[localuser@localhost ~]$ more tabc.txt
-rwx------- 1 alice staff 1586 2010-11-05 02:27 request-key
.conf
-rwx------- 1 ted staff 126 2011-04-29 13:54 cvs-pserver.co
nf
-rwx------- 1 carol staff 644 2011-03-06 21:58 ts.conf
-rwx------- 1 alice staff 17268 2011-04-29 13:54 devscripts
.conf
-rwx------- 1 bob staff 34 2011-04-29 05:18 ld.so.conf
-rwx------- 1 bob staff 92 2011-04-23 02:45 host.conf
-rwx------- 1 bob staff 4794 2011-04-22 12:14 hdparm.conf
-rwx------- 1 bob staff 1308 2011-04-19 02:06 kerneloops.co
nf
-rwx------- 1 bob staff 552 2011-04-13 15:01 pam.conf
-rwx------- 1 bob staff 322 2011-03-22 10:50 blkid.conf
-rwx------- 1 bob staff 2724 2011-02-06 22:18 reportbug.con
f
-rwx------- 1 bob staff 166 2011-01-04 22:46 tidy.conf
-rwx------- 1 bob staff 1132 2010-12-12 12:47 smi.conf
-rwx------- 1 bob staff 884 2010-11-05 00:56 insserv.conf
-rwx------- 1 alice staff 168 2011-06-26 11:38 kernel-img.c
onf
-rwx------- 1 alice staff 512 2011-04-29 05:27 nsswitch.con
===
#I then spliced out the last field in order to extract filenames
# Now I don't know how I can make files consecutively line by line using # these as their filenames???
# Should I use touch? Please help!
Dear all,
I have a text file like below.
eg.txt
abcd
efgh
ijkl
mnop
I need a script, which should read the text file eg.txt and assign each line as a parameter. This , i wil use further to pass it a java command to invoke. All inside a for loop
Need your help on this.
With... (2 Replies)
Being new to this area .I have been assigned a task which i am unable to do . Can any one please help me .
Hi I have requirement where i have input file XYZ_111_999_YYYYMMDD_1.TXT and with header and series of Numbers and Footer.
I want to create a mutiple output files with each file having a... (2 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1:... (1 Reply)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi,
I am doing something basic, but I am missing something. Im trying to read the contents of a file and taking those values and connecting to a database. However, it only connect to one (or reads in) value and then exists.
Here is what it looks like:
listname.txt
db1
db2
db3
Script:... (15 Replies)
Hi ,
I am trying to create a loop to call in the entries from the text file named Set.
The entries of Set.txtare :
1 2 3
2 4 5
and so on .. (64 such combinations)
it basically means the first combination for testing is 1 2 3 and next has to be 2 4 5 and so i have 64 such entries defined... (1 Reply)
Hi all,
I am trying to loop through the string contents of an array, to add it during the saving of the output files. I am trying this code to print each column and save it to unique file name, but it doesn't work. Thanks for any help.
fnam=(japan usa uk)
alldata.dat contained sample data... (1 Reply)
Hi,
I have a several files with ".out" extension in a folder and each file has the below like contents
....
appname: wonder1
.....
logname78.log
logname88.log
.....
CAP: 2
.....
appname: wonder54
......
logname28.log
logname58.log
logname54.log
.....
CAP: 3
..... (4 Replies)