Sponsored Content
Top Forums Shell Programming and Scripting awk/sed script to read values from parameter files Post 302255042 by rajan_san on Wednesday 5th of November 2008 08:56:59 PM
Old 11-05-2008
Thanks a lot everyone for the help it worked fine
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help!! Need script to read files and add values by lines...

Hi All, I really need your help. I am a begginner in shell script and I believe this is a very simple issue. I have in my directory, n-files, like 1.dhm, 2.dhm, 3.dhm. These files have 1 column with 1 value per line, like: 1.dhm ------ 10 20 30 40 50 2.dhm ------ 30 50 20 (3 Replies)
Discussion started by: dhuertas
3 Replies

2. UNIX for Dummies Questions & Answers

checking parameter values passed to script

Hi, I will pass 3 parameters for a script.I have to check the file name and create a new file name with time stamp. the parameters which i'm passing are /dir/stg/filename.txt /dir/path/head.txt /dir/path/tail.txt Now i have to check filename like : if it is a.txt i have to create... (2 Replies)
Discussion started by: ammu
2 Replies

3. UNIX for Advanced & Expert Users

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies

4. UNIX for Dummies Questions & Answers

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies

5. Shell Programming and Scripting

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (3 Replies)
Discussion started by: yerruhari
3 Replies

6. Shell Programming and Scripting

AWK: read values from file1; search for values in file2

I have read another post about this issue and am wondering how to adapt it to my own, much simpler, issue. I have a file of user IDs like so: 333333 321321 546465 ...etc I need to take each number and use it to print records wherein the 5th field matches the user ID pulled from the... (2 Replies)
Discussion started by: Bubnoff
2 Replies

7. Shell Programming and Scripting

'Couldn't read file' error in bash script with expect, sed and awk!

Ok, so I have a bash script with an embedded expect statement. Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time. Here's my command: cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv Now,... (0 Replies)
Discussion started by: alexdglover
0 Replies

8. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

9. UNIX for Beginners Questions & Answers

awk GSUB read field values from multiple text files

My program run without error. The problem I am having. The program isn't outputting field values with the column headers to file.txt. Each of the column headers in file.txt has no data. MEMSIZE SECOND SASFoundation Filename The output results in file.txt should show: ... (1 Reply)
Discussion started by: dellanicholson
1 Replies

10. UNIX for Beginners Questions & Answers

Script parameter with several values

Hi, On ksh I have to write a script tha I will run like this: ./myscript.ksh -param1 val1 val2 val3 .. -param2 xxx -param3 hgf Param1 will be an array: param1= ( val1 val2 val3 ..... ) How can I do that? It is not a homework!! Thank you. (1 Reply)
Discussion started by: big123456
1 Replies
Tty(3)							User Contributed Perl Documentation						    Tty(3)

NAME
IO::Tty - Low-level allocate a pseudo-Tty, import constants. VERSION
1.10 SYNOPSIS
use IO::Tty qw(TIOCNOTTY); ... # use only to import constants, see IO::Pty to create ptys. DESCRIPTION
"IO::Tty" is used internally by "IO::Pty" to create a pseudo-tty. You wouldn't want to use it directly except to import constants, use "IO::Pty". For a list of importable constants, see IO::Tty::Constant. Windows is now supported, but ONLY under the Cygwin environment, see <http://sources.redhat.com/cygwin/>. Please note that pty creation is very system-dependend. From my experience, any modern POSIX system should be fine. Find below a list of systems that "IO::Tty" should work on. A more detailed table (which is slowly getting out-of-date) is available from the project pages document manager at SourceForge <http://sourceforge.net/projects/expectperl/>. If you have problems on your system and your system is listed in the "verified" list, you probably have some non-standard setup, e.g. you compiled your Linux-kernel yourself and disabled ptys (bummer!). Please ask your friendly sysadmin for help. If your system is not listed, unpack the latest version of "IO::Tty", do a 'perl Makefile.PL; make; make test; uname -a' and send me (RGiersig@cpan.org) the results and I'll see what I can deduce from that. There are chances that it will work right out-of-the-box... If it's working on your system, please send me a short note with details (version number, distribution, etc. 'uname -a' and 'perl -V' is a good start; also, the output from "perl Makefile.PL" contains a lot of interesting info, so please include that as well) so I can get an overview. Thanks! VERIFIED SYSTEMS, KNOWN ISSUES This is a list of systems that "IO::Tty" seems to work on ('make test' passes) with comments about "features": o AIX 4.3 Returns EIO instead of EOF when the slave is closed. Benign. o AIX 5.x o FreeBSD 4.4 EOF on the slave tty is not reported back to the master. o OpenBSD 2.8 The ioctl TIOCSCTTY sometimes fails. This is also known in Tcl/Expect, see http://expect.nist.gov/FAQ.html EOF on the slave tty is not reported back to the master. o Darwin 7.9.0 o HPUX 10.20 & 11.00 EOF on the slave tty is not reported back to the master. o IRIX 6.5 o Linux 2.2.x & 2.4.x Returns EIO instead of EOF when the slave is closed. Benign. o OSF 4.0 EOF on the slave tty is not reported back to the master. o Solaris 8, 2.7, 2.6 Has the "feature" of returning EOF just once?! EOF on the slave tty is not reported back to the master. o Windows NT/2k/XP (under Cygwin) When you send (print) a too long line (>160 chars) to a non-raw pty, the call just hangs forever and even alarm() cannot get you out. Don't complain to me... EOF on the slave tty is not reported back to the master. o z/OS The following systems have not been verified yet for this version, but a previous version worked on them: o SCO Unix o NetBSD probably the same as the other *BSDs... If you have additions to these lists, please mail them to <RGiersig@cpan.org>. SEE ALSO
IO::Pty, IO::Tty::Constant MAILING LISTS
As this module is mainly used by Expect, support for it is available via the two Expect mailing lists, expectperl-announce and expectperl- discuss, at http://lists.sourceforge.net/lists/listinfo/expectperl-announce and http://lists.sourceforge.net/lists/listinfo/expectperl-discuss AUTHORS
Originally by Graham Barr <gbarr@pobox.com>, based on the Ptty module by Nick Ing-Simmons <nik@tiuk.ti.com>. Now maintained and heavily rewritten by Roland Giersig <RGiersig@cpan.org>. Contains copyrighted stuff from openssh v3.0p1, authored by Tatu Ylonen <ylo@cs.hut.fi>, Markus Friedl and Todd C. Miller <Todd.Miller@courtesan.com>. I also got a lot of inspiry from the pty code in Xemacs. COPYRIGHT
Now all code is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Nevertheless the above AUTHORS retain their copyrights to the various parts and want to receive credit if their source code is used. See the source for details. DISCLAIMER
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. In other words: Use at your own risk. Provided as is. Your mileage may vary. Read the source, Luke! And finally, just to be sure: Any Use of This Product, in Any Manner Whatsoever, Will Increase the Amount of Disorder in the Universe. Although No Liability Is Implied Herein, the Consumer Is Warned That This Process Will Ultimately Lead to the Heat Death of the Universe. perl v5.18.2 2010-10-11 Tty(3)
All times are GMT -4. The time now is 05:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy