Sponsored Content
Top Forums Shell Programming and Scripting How to store info from a txt file into a hash? Post 302997821 by Don Cragun on Saturday 20th of May 2017 03:23:02 AM
Old 05-20-2017
Since the "columns" in your file seem to be separated by one or more spaces, how do you know where the name "column" ends and the gender "column" starts? If more than one disease is associated with a name, does that add more <space>s to the last "column" in your file? If a disease has more than one word (e.g., diabetes mellitus or mitral valve prolapse), how are diseases separated from each other in the last "column"?

What have you tried to solve this problem on your own?
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

When a file is created where does unix store the info?

When a file is created where does unix store the information about the file? (5 Replies)
Discussion started by: goodmis
5 Replies

2. UNIX for Dummies Questions & Answers

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

3. Shell Programming and Scripting

Open txt and store line in a var

Hi I realy need to find a way to do a script that does the following: search a word in a txt file then store on a var the letters that are on the right like this is an exemple, I want to store from here ...abcdefg... so I need a var that receive ...abcdefg... Is that possible?... (8 Replies)
Discussion started by: ruben.rodrigues
8 Replies

4. UNIX for Advanced & Expert Users

Perl loop txt and check if a hash key

Hi, The task i have to do is to 1- create a database contains the Names .run the query and store results in hash make the Name field is the hash key 2- in the same time i have a txt which i will loop through it word by word and check for each word if a hash key ( compare it with the Names in... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

5. Shell Programming and Scripting

Generate a mail when you add info to a txt file

Hi, I have an application's log file: /var/log/logfile which is feeded from time to time due to an application. This file contains data, what I want is: -Whenever some new data is copied to /var/log/logfileI want to generate an email to root BUT only with the new added data in the body.... (6 Replies)
Discussion started by: iga3725
6 Replies

6. Shell Programming and Scripting

How to store the sql query output into txt file?

Hi I want ot save SQL query result in one txt file. for that i have written one code line sqlplus -s $dbstring @/usr/local/bin/sched/nightly_Cronjob/exec_123.sql >> /usr/local/bin/sched/nightly_Cronjob/result.txt but it is not working . database : Oracle so please advice me how can i... (7 Replies)
Discussion started by: Himanshu_soni
7 Replies

7. Programming

store information in hash and display number of keys.

I am trying to store this information (info and number) in hash. number is the key and info is value in a hash.i shown my code below. #!/usr/bin/perl use warnings; use strict; use XML::LibXML::Reader; my $file;open $file, 'formal.xml'); my $reader =... (0 Replies)
Discussion started by: veerubiji
0 Replies

8. Shell Programming and Scripting

Store output of DB Cursor to a txt file

I am writing a cursor to select values from 3 tables. I want to store these values in a txt file which I will be sending via ftp. I am able to store the results of simple select queries to the txt file. but I am not sure how to store the values when using a cursor. I have given the sql query below.... (1 Reply)
Discussion started by: naveensraj
1 Replies

9. Shell Programming and Scripting

Store a column from an excel sheet (exported to txt) into a variable

I typically pull a bunch of data via SQL that lists a bunch of users and the server on which they want to access, as well as other attributes, in one row of an excel sheet and the number of rows is directly proportionate to the number of users. I'm trying to write a loop to read each line of the... (2 Replies)
Discussion started by: MaindotC
2 Replies

10. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies
Purple(3)						User Contributed Perl Documentation						 Purple(3)

NAME
Purple - Perl extension to the libpurple instant messenger library. SYNOPSIS
use Purple; ABSTRACT
This module provides the interface for using perl scripts as plugins in libpurple. DESCRIPTION
This module provides the interface for using perl scripts as plugins in Purple. With this, developers can write perl scripts that can be loaded in Purple as plugins. The scripts can interact with IMs, chats, accounts, the buddy list, libpurple signals, and more. The API for the perl interface is very similar to that of the Purple C API, which can be viewed at http://developer.pidgin.im/doxygen/ or in the header files in the Purple source tree. FUNCTIONS
@accounts = Purple::accounts Returns a list of all accounts, online or offline. @chats = Purple::chats Returns a list of all chats currently open. @connections = Purple::connections Returns a list of all active connections. @conversations = Purple::conversations Returns a list of all conversations, both IM and chat, currently open. @conv_windows = Purple::conv_windows Returns a list of all conversation windows currently open. @ims = Purple::ims Returns a list of all instant messages currently open. SEE ALSO
Purple C API documentation - http://developer.pidgin.im/doxygen/ Purple website - http://pidgin.im/ AUTHOR
Christian Hammond, <chipx86@gnupdate.org> COPYRIGHT AND LICENSE
Copyright 2003 by Christian Hammond This library is free software; you can redistribute it and/or modify it under the terms of the General Public License (GPL). For more information, see http://www.fsf.org/licenses/gpl.txt perl v5.12.1 2010-02-16 Purple(3)
All times are GMT -4. The time now is 04:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy