03-19-2009
I don't think its used often but sometimes its just what you need.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have some .dat files that I cannot open and read the data. It is an awk program file, and my question would be to you all is there a way to convert this awk file to ascii text?
Thanks (10 Replies)
Discussion started by: ryangfm
10 Replies
2. Shell Programming and Scripting
Hi Friends,
I need your help.
I am not able to execute one awk program .If you can solve the following small program
then i can solve other one.
$ vi prg
#!/bin/awk -f
BEGIN {
# Print the squares from 1 to 10 the first way
i=1;
while (i <= 10) {
... (3 Replies)
Discussion started by: bikas_jena
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I need to grep the 3 characters from a file, and to fetch the corresponding words to that character. My file is in the following format..
The below text will be in the separate file....say file2.txt
ABC This is the first text.
DEF This is the second text.
GH1 9.8.7890
AB1... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies
4. UNIX for Dummies Questions & Answers
:(Hi all,
I have a doubt in AWK program. I am writing an awk program which accepts a parameter as input and it should display the corresponding details.
if the country as "US" it should be displayed as "United States of America"
and the country as "IN" India should be displayed. How can I... (2 Replies)
Discussion started by: sivakumar.rj
2 Replies
5. Shell Programming and Scripting
Hi
I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it
The code is that:
{
if (NF==17){
print $0
}else{
fields=NF;
all=$0;
while... (2 Replies)
Discussion started by: fate
2 Replies
6. Shell Programming and Scripting
Dear All,
facing problem to get data in different fields. SO i am using # to get the data..
please refer my code below...
BEGIN { FS=" " }
{
if ( $1 == "START" )
{
i = i+1;
SFILENAME = FILENAME
}
if ( substr($1,2,8) == "filename" )
... (1 Reply)
Discussion started by: arvindng
1 Replies
7. Shell Programming and Scripting
I have a csv file as below :
NAME,5a-6a,6a-7a,7a-8a,8a-9a,9a-10a,10a-11a,11a-12n,12n-1p,13p-14p,14p-15p,15p-16p,16p-17p,17p-18p,18p-19p,19p-20p,20p-21p,21p-22p,22p-23p,11p-12m, TOTALS... (6 Replies)
Discussion started by: deo_kaustubh
6 Replies
8. Shell Programming and Scripting
i have two files,
one looks like this (file1):
novelMiR_892 novelMiR_891,
novelMiR_852
novelMiR_893
novelMiR_1661
novelMiR_854
novelMiR_1210
novelMiR_1251
novelMiR_855
novelMiR_1252
novelMiR_897 novelMiR_2336,novelMiR_2335,and the second like this... (5 Replies)
Discussion started by: dietmar13
5 Replies
9. Shell Programming and Scripting
Hi All,
I have an AWK code snippet which I want to use in Perl. How can I achieve the same thing in perl? Here I am searching for a pattern in a file and from that matching line, I am extracting the 3rd column value and storing it in a variable which I later on use this value in a if condition.
... (2 Replies)
Discussion started by: sanzee007
2 Replies
10. Shell Programming and Scripting
Hi All ,
I have set of input files with one of the fields as below
File 1 -Field 1=BUDGET_CURR_FX
File 2 -Field 1=BUDGET_MTH_AVGFX
File 3 -Field 1=BUDGET_PREV
Now i need to include one extra field in the new file as below
Output File 1 -Field 1= BUDGET Field2=CURRENT_FX
Output File... (2 Replies)
Discussion started by: Hypesslearner
2 Replies
LEARN ABOUT DEBIAN
filter_create_fd
filter_create_fd(3) util/filter.h filter_create_fd(3)
NAME
filter_create_fd - Create a sub process and return the requested pipes
SYNOPSIS
#include <util/filter.h>
NEOERR *filter_create_fd(const char *cmd, int *fdin, int *fdout, int *fderr,
pid_t *pid);
ARGUMENTS
cmd -> the sub command to execute. Will be executed with
/bin/sh -c
fdin -> pointer to return the stdin pipe, or NULL if you don't
want the stdin pipe
fdout -> pointer to return the stdout pipe, or NULL if you don't
want the stdout pipe
fderr -> pointer to return the stderr pipe, or NULL if you don't
want the stderr pipe
DESCRIPTION
filter_create_fd and filter_create_fp are what popen
been: a mechanism to create sub processes and have pipes to all their input/output. The concept was taken from mutt, though python has
something similar with popen3/popen4. You control which pipes the function returns by the fdin/fdout/fderr arguments. A NULL value means
"don't create a pipe", a pointer to an int will cause the pipes to be created and the value of the file descriptor stored in the int. You
will have to close(2) the file descriptors yourself.
RETURN VALUE
fdin -> the stdin file descriptor of the sub process
fdout -> the stdout file descriptor of the sub process
fderr -> the stderr file descriptor of the sub process
pid -> the pid of the sub process
SEE ALSO
filter_wait(3), filter_create_fp(3), filter_create_fd
ClearSilver 12 July 2007 filter_create_fd(3)