Sponsored Content
Top Forums Shell Programming and Scripting Error in the o/p says bad file descriptor... Post 302770518 by alister on Saturday 16th of February 2013 09:51:44 PM
Old 02-16-2013
Quote:
Originally Posted by nikhil jain
Code:
wc -l combo_operncount.$dline|awk '{print $1}'

If you don't want wc to print a filename, don't provide one as an argument. Instead, redirect the command's standard input:
Code:
wc -l < filename

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

bad file descriptor?

Ok, I'm sure this is a total newbie question, but I think I'm in the right place, no? I'm trying to call a perl module from a cgi script - Mail::Sendmail - and my web host installed the module in a directory that doesn't seem to be accessible, at least not the way I'm trying. But I thought you... (1 Reply)
Discussion started by: ftb
1 Replies

2. UNIX for Advanced & Expert Users

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (1 Reply)
Discussion started by: shilendrajadon
1 Replies

3. Shell Programming and Scripting

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (2 Replies)
Discussion started by: shilendrajadon
2 Replies

4. UNIX for Dummies Questions & Answers

File Descriptor

Hi What the below path contains? /proc/<pid>/fd (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

5. Programming

utime returning -1 BAD File DEscriptor

Hi All, First of all thanks for reading this post. In my application, I am trying to create a new message queue . I am attaching the code below. mqd_t mqopen2(const char * pName, unsigned long Flags, long maxMsg, long msgSz) {... (15 Replies)
Discussion started by: parusasi
15 Replies

6. Ubuntu

ufsdump from Solaris to ubuntu fails with bad file descriptor

Hi All I have a dedicated backup server running ubuntu 10.04, which has recently been rebuilt (same OS, just different h/w) This is used to receive ufsdump output from a number of Solaris servers, using the following syntax: ufsdump 1uf :/path/to/backup/file /fs/to/be/backed/up This has... (1 Reply)
Discussion started by: in2deep
1 Replies

7. Solaris

18-Mar-2012 14:25:03.209 general: error: socket: file descriptor exceeds limit (4096/4096)

I have BIND 9.8.1-P1 cache only DNS server running in Solaris 10. I have upgraded the same from 9.6.1 to 9.8.1-P1. Now i am facing "file descriptor exceeds limit (4096/4096)" error frequently on the server. Please help me on this issue! (1 Reply)
Discussion started by: sandeep.tk
1 Replies

8. Solaris

Bad exchange descriptor : not able to remove files under zpool

Hi , One of my zone went down and when i booted it up i could see the pool in degraded state with some check sum errors . we have brought the pool online after scrubbing. But few files are showing this error Bad exchange descriptor Please let me know how to remove these files (2 Replies)
Discussion started by: chidori
2 Replies

9. Solaris

File System Error: BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE

Hi All, we are having a file system error in one of our servers. The server failed to boot in usual user mode. Instead boot with single user mode and requesting to run a FSCK manually to repair the corrupted. see the below output. Netra T2000, No Keyboard Copyright 2008 Sun Microsystems,... (5 Replies)
Discussion started by: Buddhike G
5 Replies

10. UNIX for Beginners Questions & Answers

Bad file descriptor - error with sed

I'm learning SED command. And while doing that i got to this place where i'm taking a copy of my existing file. The code i used is - sed -n '/Storm/ w Storm.txt' books.txt As expected, the file 'books.txt' is read , and lines with 'Storm' is put in to the new file 'Storm.txt'. However, it also... (4 Replies)
Discussion started by: justo
4 Replies
euctoibmj(1)							   User Commands						      euctoibmj(1)

NAME
euctoibmj, ibmjtoeuc - Code conversion between Japanese EUC and IBM-Japanese SYNOPSIS
euctoibmj [-t] [-u code] [-U] [filename...] ibmjtoeuc [-u code] [-U] [filename...] AVAILABILITY
SUNWjfpu DESCRIPTION
euctoibmj converts the contents of the specified filenames from ASCII/ Japanese EUC to EBCDIC/IBM-Japanese. ibmjtoeuc converts the con- tents of the specified filenames from EBCDIC/IBM-Japanese to ASCII/ Japanese EUC. The both commands write the resultant code to stdout. If filename is not given, input characters are read from the standard input. For Japanese language handling, the euctoibmj/ibmjtoeucj pair of commands provide conversion only between the two code standards. Code con- version among Japanese EUC, JIS, and PC kanji are supported by another set of commands, jistoeuc(1) family or iconv(1). OPTIONS
-u code With this option specified, characters in one code set that do not have corresponding characters in the other are mapped to the code given in four-digit hexadecimal HOST CODE of IBM Japanese (for euctoibmj) or in four-digit JIS Ku-Ten code (for ibmjtoeuc). Without this option, such characters are mapped to HOST CODE 4040 (for euctoibmj) or JIS Ku-Ten code 0101 (for ibmjtoeuc). -U The output is not buffered (The default is buffered output). -t With this option specified, euctoibmj translates Half-Size Katakana (Code Set 2) in Japanese EUC to the corresponding characters in Code Set 1 prior to conversion. Without this option, Code Set 2 characters in Japanese EUC are processed to the illegal charac- ter. ENVIRONMENT VARIABLES
The environment variables LC_CTYPE and LANG control the character classification throughout these commands. For euctoibmj and ibmjtoeuc to work correctly, one or both of the environment variables must be set to ja or an equivalent locale. On entry to these commands, these envi- ronment variables are checked in the following order: LC_CTYPE and LANG. When a valid value is found, remaining environment variables for character classification are ignored. FILES
/usr/lib/jcodetables/ibmj-euc Code conversion table for IBM Japanese. SEE ALSO
iconv(1), jistoeuc(1), iconv_ja(5) DIAGNOSTICS
unexpected data encountered in input. Illegal character code is found in input file. BUGS
The ASCII/EBCDIC conversion table are taken from the 256 character standard in the CACM Nov, 1968. The conversion, while less blessed as a standard, corresponds better to certain IBM print train convertions. There is no universal solution. The Japanese EUC/IBM Japanese conversion table is based on the IBM Kanji codebook (4th edition - September 1987), JIS X 0201, and JIS X 0208-1983. If JIS X 0212 caracter set is specified as input, euctoibmj can not support the conversion correctly. SunOS 5.10 10 Jan 2003 euctoibmj(1)
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy