Sponsored Content
Top Forums Shell Programming and Scripting search 3 file and write to 4th file (a bit complex) Post 302484006 by gc_sw on Wednesday 29th of December 2010 10:07:53 AM
Old 12-29-2010
Smilie error:

Code:
nawk: syntax error at source line 1
context is
   >>> {if(FILENAME=="rollbackip.txt"){a[$1$2]++;next;}if(FILENAME=="ip-port.txt"){b[$3$2]=$4;next;}if(FILENAME=="lookup.txt"){if( <<<
nawk: illegal statement at source line 1
nawk: syntax error at source line 1

do i have to change {if(FILENAME==/home/gcsw/.../rollbackip.txt like this? i have tried both, but no result..
 

10 More Discussions You Might Find Interesting

1. Programming

How to write a code in C to search a file

Dear All, Plz give me some code that how can I search a file through a C program file may be in Present Directory or in its Sub-Directories and it should support Linux Platform. :mad: (6 Replies)
Discussion started by: krishna_sicsr
6 Replies

2. Shell Programming and Scripting

write shell script to search file in folder

hi .. i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Discussion started by: shubhig15
1 Replies

3. Shell Programming and Scripting

"Search for files in a file and write these files to another file which sould be in some other direc

Hi , Need to shell script to extracts files names and write those to another file in different directory. input file is inputfile.txt abc|1|bcd.dat 123 david123 123 rudy2345 124 tinku5634 abc|1|def.dat 123 jevid123 123 qwer2345 124 ghjlk5634 abc|1|pqr.txt 123 vbjnnjh435 123 jggdy876... (1 Reply)
Discussion started by: dssyadav
1 Replies

4. UNIX for Dummies Questions & Answers

Write 2nd and 3rd fields to a 4th file name?

I have a flatfile A.txt date|products|notes|location 121117|a108|this is a test|florida 121118|b111|just test it|tampa How do i write an awk to create a file name as location.txt and have products:notes awk -F'|' '{ print $2 ":" $3 }' A.txt > $4.txt I am sure it cannot write to... (5 Replies)
Discussion started by: sabercats
5 Replies

5. UNIX for Dummies Questions & Answers

Trying to understand a complex bit of code

Hi, To re-introduce myself, I'm a router guy trying to learn some scripting from the examples in my work place... In a ksh script, one of the script guys wrote the following and I am trying to understand it. I'm hoping someone can explain it to me. The script flow enters a case structure.... (5 Replies)
Discussion started by: Marc G
5 Replies

6. Shell Programming and Scripting

Search and replace from file in awk using a 16 bit text file

Hello, Some time ago a helpful awk file was provided on the forum which I give below: NR==FNR{A=$0;next}{for(j in A){split(A,P,"=");for(i=1;i<=NF;i++){if($i==P){$i=P}}}}1 While it works beautifully on English and Latin characters i.e. within the ASCII range of 127, the moment a character beyond... (6 Replies)
Discussion started by: gimley
6 Replies

7. Shell Programming and Scripting

Need to search a particular String form a file a write to another file using perl script

I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file. Kindly provide your input. File is like below Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies

8. Shell Programming and Scripting

Search pattern and write line into another file

Hi, I have a file which contains the below details.. My requirement is to fetch all the lines which are starting with "ABC_XY_" into 1 file and rest of the lines (not starting with "ABC_XY_") into another file. Could you please help with what command needs to be used? file1.txt ----------... (12 Replies)
Discussion started by: satyaatcgi
12 Replies

9. Shell Programming and Scripting

Search text beween tags and write to file using awk

Hi Friends, I have a very big text file, that has code for multiple functions. I have scan through the file and write each function in seperate file. All functions starts with BEGIN DSFNC Identifier "ABCDDataValidationfnc" and ends with END DSFNC I need create a file(using identifier)... (2 Replies)
Discussion started by: anandapani
2 Replies

10. Shell Programming and Scripting

Search the specific content from the complex file

Hi, I have a file with complex data without delimiter, have requirement to fetch the specific record based on some charcters. here is my file data ... (12 Replies)
Discussion started by: Riverstone
12 Replies
SOTRUSS(1)                                                         User Commands                                                        SOTRUSS(1)

NAME
sotruss - trace shared library calls through PLT SYNOPSIS
sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...] DESCRIPTION
sotruss is a small wrapper around ld.so that runs the specified executable until it exits. It intercepts and produce a trace of the dynamic library calls which are called by the executed process via the Procedure Linkage Table (PLT). It outputs the caller, the calle and the parameters as each call is executed. OPTIONS
-F, --from FROMLIST Trace calls from objects on FROMLIST. -T, --to TOLIST Trace calls to objects on TOLIST. -e, --exit Also show exits from the function calls. -f, --follow Trace child processes as they are created by currently traced processes as a result of the fork(2) system call. -o, --output FILENAME Write output to FILENAME (or FILENAME. in case -f is also used) instead of standard error. -?, --help Give this help list --usage Give a short usage message --version Print program version AUTHOR
Written by Ulrich Drepper. COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
ld.so(8). sotruss May 2014 SOTRUSS(1)
All times are GMT -4. The time now is 05:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy