Sponsored Content
Full Discussion: Finger has gone crazy
Top Forums Shell Programming and Scripting Finger has gone crazy Post 302414741 by alister on Wednesday 21st of April 2010 12:04:39 AM
Old 04-21-2010
I'm guessing that you see these errors when $1 assumes a value it had already been assigned earlier. That pipe will still be open, getline will fail to read anything from it, and userinfo remains unchanged. If that's not the case, without seeing the code and input data that generate the errors, I have no idea.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix driving me crazy

:( :confused: what is performed by the following unix command: grep -v Jane project1.txt and grep ' 5\..' janet.txt (1 Reply)
Discussion started by: Tendernisin
1 Replies

2. UNIX for Dummies Questions & Answers

Oh no!! crazy script

Hi Could be stupid, but I can figure out... I have a script that downloads a file from a http server ( virus definitions file ). The thing is that when I run it from the console (bash) works fine, but when I put it in the root's cron it doesn't, and it generates a core file. example: ... (8 Replies)
Discussion started by: piltrafa
8 Replies

3. Shell Programming and Scripting

going crazy with test???

oK, i know for sure that code = Y and var = N but no matter what this always prints ignore, never valid??????? if test "$code"="$var" ... (2 Replies)
Discussion started by: mich_elle00
2 Replies

4. UNIX for Advanced & Expert Users

Crazy mx record redirect

So here is the story i have hired an outside company to filter spam i have since changed the mx record on my server and i have locked down the firewall. Spam has stopped totally which is great however my mx record seem to be propagating back and forth between my old and my new one day it will be... (2 Replies)
Discussion started by: nbredthauer
2 Replies

5. Shell Programming and Scripting

ftp going crazy

Dear Friends, I am having a crazy issue with ftp. I am doing 'mput' of 4 files (z1, z2, z3, z4) as below. But ftp transfers only every alternative file !! - ie; If I do mput z* for above, it sends only z1 and z3. Note that all the files are same and I tried this for several dummy files. All... (3 Replies)
Discussion started by: yoursdivu
3 Replies

6. Shell Programming and Scripting

Pleas help..this is driving me crazy

Hi, I've created a script in csh that takes a file and checks it for mispelled words. Im almost done but I need to do two more things but I need help. First, when displaying an incorrect word to the user, I need to show the line of the input file that contains the word. Second,if the user... (0 Replies)
Discussion started by: hckygoli31
0 Replies

7. What is on Your Mind?

crazy dreams..

well, Wine is simply amazing.. I love it. the filesystems are great too -- never having to defragment, and not slowing down in time. I love the power of BASH. iptables.. but.. I had a vision. a crazy dream. what if, we could develop an installation system for Linux.. working pretty much... (3 Replies)
Discussion started by: ialoq
3 Replies

8. Homework & Coursework Questions

Crazy Dots

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Create a script called DOTS that will display the horizontal or vertical number of dots if the first argument... (3 Replies)
Discussion started by: pchelpmtl
3 Replies

9. What is on Your Mind?

Here's To The Crazy One

Please excuse my indulgence. Thank you MG Siegler and Steve Jurvetson. But most importantly, thank you Steve Jobs. 8rwsuXHA7RA The world has lost a genius. (1 Reply)
Discussion started by: Scott
1 Replies

10. Shell Programming and Scripting

Crazy Syntax

Hello All, was looking at a script wrote by someone and when I try and run it in ksh it gives me an error. Could ksh version be a problem or is there something wrong that I'm missing, when I run it from the command line it works. Thanks! results=`sudo -u admin ssh... (1 Reply)
Discussion started by: akechnie
1 Replies
FSCANF(3)								 1								 FSCANF(3)

fscanf - Parses input from a file according to a format

SYNOPSIS
mixed fscanf (resource $handle, string $format, [mixed &$...]) DESCRIPTION
The function fscanf(3) is similar to sscanf(3), but it takes its input from a file associated with $handle and interprets the input according to the specified $format, which is described in the documentation for sprintf(3). Any whitespace in the format string matches any whitespace in the input stream. This means that even a tab in the format string can match a single space character in the input stream. Each call to fscanf(3) reads one line from the file. PARAMETERS
o $handle -A file system pointer resource that is typically created using fopen(3). o $format - The specified format as described in the sprintf(3) documentation. o $... - The optional assigned values. RETURN VALUES
If only two parameters were passed to this function, the values parsed will be returned as an array. Otherwise, if optional parameters are passed, the function will return the number of assigned values. The optional parameters must be passed by reference. EXAMPLES
Example #1 fscanf(3) Example <?php $handle = fopen("users.txt", "r"); while ($userinfo = fscanf($handle, "%s %s %s ")) { list ($name, $profession, $countrycode) = $userinfo; //... do something with the values } fclose($handle); ?> Example #2 Contents of users.txt javier argonaut pe hiroshi sculptor jp robert slacker us luigi florist it SEE ALSO
fread(3), fgets(3), fgetss(3), sscanf(3), printf(3), sprintf(3). PHP Documentation Group FSCANF(3)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy