Sponsored Content
Full Discussion: UNIX file reading
Top Forums Shell Programming and Scripting UNIX file reading Post 302456472 by vkca on Friday 24th of September 2010 10:03:53 AM
Old 09-24-2010
Java UNIX file reading

i have a directory that has n files starting with ABC_00x.txt and ABC_00x.txt where x is the integer number.
i want to read the contents of each file and write it into a log file.
can somebody help me in writing the shell script in unix
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Reading Particular Line From A File in Unix

Can any u pls tell me :- I want to read a particular line from a file, say line no. 10. This can be done by using awk..but that method I think, is inefficient. Is there any direct command for this? Thanks (2 Replies)
Discussion started by: yeheyaansari
2 Replies

2. UNIX for Advanced & Expert Users

Reading lines within a Unix file.

I have a file that has a list of numbers in it. Each line has a different number. I am trying to create some sort of loop within a script that will pick the numbers up on lines 1 and 2 and then put those figures into the script. It then goes through the process then loops back and reads lines 2 and... (5 Replies)
Discussion started by: mariner
5 Replies

3. Shell Programming and Scripting

file reading in unix

Hi , I need to read line by line from a file. Can u please tell me the most efficient way to do it. SInce i will be reading more than 1000 files in my program. i am trying the following options : 1. nawk option nawk'{ print $0 }'files.temp 2. filecount=`cat files.temp | wc -l`... (2 Replies)
Discussion started by: pradeepthanraj
2 Replies

4. Filesystems, Disks and Memory

reading unix file system from windows

I found a more appropriate section to post my question. Thanks! (0 Replies)
Discussion started by: cneill
0 Replies

5. UNIX for Dummies Questions & Answers

UNIX script for reading a file and creating another file

Hi, I am a beginner in scripting...I have to do a script where I have to read a file which has list of job names, line by line and for every line execute a dsjob command to find the log details of the job and extract only the start time of the job, if it is greater than jan 01 2008 and create... (1 Reply)
Discussion started by: Vijay81
1 Replies

6. Shell Programming and Scripting

UNIX File handling -Issue in reading a file

I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
1 Replies

7. Shell Programming and Scripting

Reading UNIX commands from file and redirecting output to a file

Hi All I have written the following script: #!/bin/ksh while read cmdline do echo `$cmdline` pid="$cmdline" done<commands.txt =========== commands.txt contains: ps -ef | grep abc | grep xyz |awk '{print $2}; My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies

8. Shell Programming and Scripting

How to ignore single or multiple lines between /* and */ while reading from a file in unix?

I have a file proc.txt: if @debug = 1 then message 'Start Processing ', @procname, dateformat(now(*), 'hh:mm:ss'), @julian type info to client; end if; /* execute immediate with quotes 'insert into sys_suppdata (property, value, key_name) location ''' || @supp_server || '.' ||... (5 Replies)
Discussion started by: kidncute
5 Replies

9. Shell Programming and Scripting

Reading input from web into UNIX file

Hi, Could someone let me know how to read input from a web page into a unix file. I am writing my script in bash shell in Solaris version. Thanks in advance, ayarlaga. (7 Replies)
Discussion started by: ayarlaga
7 Replies

10. UNIX for Dummies Questions & Answers

UNIX File reading question

Is there a script that will automatically access/count the words in each individual file for a program? (Sorry, I'm trying to help my girlfriend who's in computer science out, I know nothing about this. We're having trouble wording this question.) (1 Reply)
Discussion started by: Triple M
1 Replies
trcs(1) 							   User Manuals 							   trcs(1)

NAME
trcs - convert text files from one codeset to other SYNOPSIS
trcs -C | -l | -h trcs [-s] [-f input-codeset ] [-t output-codeset ] [ file ]... DESCRIPTION
trcs is a program for translation of text files from one codeset to other. When exact translation is impossible it tries to make approxi- mations. For example pseudographic characters are approximated by ASCII characters in codesets that have no pseudographic characters and characters with diacritical marks are approximated by existing characters. If the option -s or --gen-script is given trcs will generate simple script that invokes tr(1) This is useful if you want to include this in your script or for faster conversion of many files. If none of -C, -s, -l, -h and their equivalents is given each file will be read assuming it is coded with codeset input-codeset On standard output it will be recoded so to use codeset output-codeset If there is no file given trcs will act as filter. Both input-codeset and out- put-codeset are case insensitive and default to `cp1251'. OPTIONS
-C, --copyright Display copying conditions and warranty information. -s, --gen-script Generates conversion script for given input and output encodings instead to convert text files. -l, --list List all known codesets with their aliases. -h, --help Display this help and exit. -f input-codeset, --from[=]input-codeset Codeset of the source. -f output-codeset, --to[=]output-codeset Codeset of the output. EXAMPLES
trcs -fcyrillic -t koi8-r letter.txt Convert letter.txt from ISO-8859-5 (cyrillic) to KOI8-R and output the result on standard output. trcs --from cp437 --to=mik --gen-script >ibm2mik Generates script ibm2mik for converting from CP437 to MIK. sh ibm2mik screen.txt Convert screen.txt from CP437 to MIK. Output the result on standard output. Without parameters ibm2mik acts as filter. AUTHOR
Anton Zinoviev <anton@lml.bas.bg>, <zinoviev@fmi.uni-sofia.bg> SEE ALSO
tr(1) Linux JUN 2000 trcs(1)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy