Sponsored Content
Full Discussion: Extract from txt file
Top Forums Shell Programming and Scripting Extract from txt file Post 302325884 by joeyg on Tuesday 16th of June 2009 11:06:12 AM
Old 06-16-2009
Tools For what purpose?

Your request has the 'look and feel' of homework? To merely read data and store to an array does not serve any purpose. Please explain what you are trying to do.
 

10 More Discussions You Might Find Interesting

1. Programming

c file to extract real value from a txt file

Hello Friends,, I m really a new bee to C programms , please help me with a code.. I found some theads here similar to this but Not able to solve what exactly I want.. suppose I ve txt file as below. abc.txt 12 23 10 11 131 159 12.2 13.8 Then I want to... (7 Replies)
Discussion started by: user_prady
7 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

Extract content from several txt-files

Hi! Im trying to write a script in ksh that creates a single txt-file from specific content in several other txt-files. From these files I want to extract all text after 'WORD' and before '=', regardless of number of lines and other content. I have tried cat and guess I need... (7 Replies)
Discussion started by: larsu
7 Replies

4. Shell Programming and Scripting

extract words from txt using perl

Hi, i will deal with txt file and i want to use perl to extract number of words from this txt ex :if the txt file is a story which contains person names and iwant to extract these names and there is something else that these names which i want perl to extract must match the words (person names) ... (2 Replies)
Discussion started by: eng_shimaa
2 Replies

5. UNIX for Dummies Questions & Answers

Extract numbers from .txt file

I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!! The .txt file looks essentially like this... (5 Replies)
Discussion started by: eggali
5 Replies

6. Shell Programming and Scripting

Command to extract all columns except the last few from a txt file

hello, i have publicly available txt file with little less than 300000 rows. i want to extract from column 1 to column 218 and save it in another text file. i use the cut command but the file is saved with multiple rows from the source file onto a single row in the destination. basically it is... (6 Replies)
Discussion started by: madrazzii
6 Replies

7. Shell Programming and Scripting

Script extract text from txt file with grep

All, I require a script that grabs some text from the gitHub API and will grep (or other function) for a string a characters that starts with (") quotes followed by two letters, may contain a pipe |, and ending with ) . What i have so far is below but it's not returning anything. ... (4 Replies)
Discussion started by: ChocoTaco
4 Replies

8. Shell Programming and Scripting

Extract the filename and write to .txt

I'm new to this forum and also to UNIX scripting. I need a command to extract the filename from the path and write to .txt file. Thanks in advance for your guidance. (23 Replies)
Discussion started by: Ram Kumar_BE
23 Replies

9. Shell Programming and Scripting

Extract information from txt file

Hello! I need help :) I have a file like this: AA BC FG RF TT GH DD FF HH (a few number of rows and three columns) and I want to put the letters of each column in a variable step by step in order to give them as input in another script. So I would like to obtain: for the 1° loop:... (11 Replies)
Discussion started by: edekP
11 Replies

10. UNIX for Beginners Questions & Answers

To extract values after the maximum value in a txt file

Hello, I'm new to scripting and I need to write a bash script. Here is example of file on which I'm working: 0.3092381 0.3262799 0.3425480 0.3578379 0.3719490 0.3846908 0.3958855 0.4053738 0.4130160 0.4186991 0.4223357 ... (1 Reply)
Discussion started by: jeo_fb
1 Replies
APC_ADD(3)								 1								APC_ADD(3)

apc_add - Cache a new variable in the data store

SYNOPSIS
bool apc_add (string $key, mixed $var, [int $ttl]) DESCRIPTION
array apc_add (array $values, [mixed $unused = NULL], [int $ttl]) Caches a variable in the data store, only if it's not already stored. Note Unlike many other mechanisms in PHP, variables stored using apc_add(3) will persist between requests (until the value is removed from the cache). PARAMETERS
o $key - Store the variable using this name. $keys are cache-unique, so attempting to use apc_add(3) to store data with a key that already exists will not overwrite the existing data, and will instead return FALSE. (This is the only difference between apc_add(3) and apc_store(3).) o $var - The variable to store o $ttl - Time To Live; store $var in the cache for $ttl seconds. After the $ttl has passed, the stored variable will be expunged from the cache (on the next request). If no $ttl is supplied (or if the $ttl is 0), the value will persist until it is removed from the cache manually, or otherwise fails to exist in the cache (clear, restart, etc.). o $values - Names in key, variables in value. RETURN VALUES
Returns TRUE if something has effectively been added into the cache, FALSE otherwise. Second syntax returns array with error keys. EXAMPLES
Example #1 A apc_add(3) example <?php $bar = 'BAR'; apc_add('foo', $bar); var_dump(apc_fetch('foo')); echo " "; $bar = 'NEVER GETS SET'; apc_add('foo', $bar); var_dump(apc_fetch('foo')); echo " "; ?> The above example will output: string(3) "BAR" string(3) "BAR" SEE ALSO
apc_store(3), apc_fetch(3), apc_delete(3). PHP Documentation Group APC_ADD(3)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy