Sponsored Content
Full Discussion: AWK command problem
Contact Us Post Here to Contact Site Administrators and Moderators AWK command problem Post 302264687 by sybase08 on Thursday 4th of December 2008 03:03:50 PM
Old 12-04-2008
Thanks Ikon for your comment.

I also need a new line with the string "go" to be appeared at the next line. example:


Hello my friend.
go
Hello my mother.
go

how can i acheive that?

Thanks,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem in awk command

Hello all, i am new one to this forum. : i have file with these contents.. internal://project/squid-internal-static/icons/anthony-xpm.gif http://widget.blogrush.com/img/br.png http://www.wingware.com/css/print http://publib.boulder.ibm.com/infocenter/systems/advanced/filterwarning.css... (3 Replies)
Discussion started by: viveksnv
3 Replies

2. Shell Programming and Scripting

Problem with sub command (awk) and numbers

Hi, I am trying to perform a simple soustraction between two floating numbers and cannot get it done for some reason due to the use of the sub command. The following is the straight-forward result of the soustraction: $ echo | gawk '{a=968;b=967.99;c=a-b;print c}' ... (2 Replies)
Discussion started by: Indalecio
2 Replies

3. Shell Programming and Scripting

Problem in awk command

Hello, I am getting problem in awk command during matching (using if in awk) when there is special character "" I have tried by loosing the special meaning, still its not working Below is my code: set pinname_watch = "DCORRECT" set pinname = "DCORRECT\" echo 'defineGateSize... (2 Replies)
Discussion started by: nehashine
2 Replies

4. Shell Programming and Scripting

problem with awk command

I am having problem running an awk commad on a file Before applying awk command on the file After applying I don't expect more than 409743 records in the file. Why do I have 1 record more after applying awk command? Please let me know (4 Replies)
Discussion started by: dsravan
4 Replies

5. Shell Programming and Scripting

problem with awk command

I have written some code in a KSH script to find the index of the character in a string like this #!usr/bin/ksh string="Hi How are you" awk 'BEGIN {print index ($string, "are")}' My expected output should be : 8 but it is giving the out put as : 0 I wanted to store that index value in... (8 Replies)
Discussion started by: hemanth424
8 Replies

6. UNIX for Dummies Questions & Answers

problem with awk command in script.

#!/bin/sh date=`date +%y%m%d -d"1 day ago"` inbound_dir=/vis/logfiles/to_solmis cp `grep -il ST~856~ $inbound_dir/*$date*` /vis/sumit/in_ASN/ echo 'SENDER,RECEIVER,DATE,TIME,ASNUMBER' > a.csv for i in /vis/sumit/in_ASN/* do ... (8 Replies)
Discussion started by: shrima.pratima
8 Replies

7. Shell Programming and Scripting

Alias problem with awk command

Hi to all, I'm facing some problems when adding an alias like: #alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'" and when I enter: #list I get: Syntax Error The source line is 1. The error context is { print >>> , <<< awk:... (3 Replies)
Discussion started by: enux
3 Replies

8. Shell Programming and Scripting

Problem with Variable and AWK command

Okay, so I am trying to use a count variable to reference the column of output sent from an echo statement. So I am trying to do this #!/bin/bash CURRENT=$PWD VAR=3 CHANGE=`echo $CURRENT | awk -F "/" '{ print \$$VAR }'` This instead of giving me the third instance after the "/" gives... (4 Replies)
Discussion started by: mkjp2011
4 Replies

9. Shell Programming and Scripting

getting problem in awk command

Hi, I have one file with tab delimited values in it. i want to increase the value of 6th field by 2 if value of 3rd field is greater than 2 . The command is working fine but space between the field is getting removed after adding. below is the file and the command Filename: test1.txt ... (13 Replies)
Discussion started by: ravi_agarwalla
13 Replies

10. Shell Programming and Scripting

Execution Problem with awk command

Hi All, I am trying to find a word from a file in loop. while read i; do DB_Name=$i awk '{for(i=1;i<=NF;i++)if($i~/$DB_Name/)print $(i)}' $BTEQ_NAME > $DB_Name_TableList.txt done <Param.txt here Param.txt contents data as ODS_TARGT_RECV FIN_TARGT... (7 Replies)
Discussion started by: Shilpi Gupta
7 Replies
DEBUG_BACKTRACE(3)							 1							DEBUG_BACKTRACE(3)

debug_backtrace - Generates a backtrace

SYNOPSIS
array debug_backtrace ([int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT], [int $limit]) DESCRIPTION
debug_backtrace(3) generates a PHP backtrace. PARAMETERS
o $options - As of 5.3.6, this parameter is a bitmask for the following options: debug_backtrace(3) options +-------------------------------+---------------------------------------------------+ |DEBUG_BACKTRACE_PROVIDE_OBJECT | | | | | | | Whether or not to populate the "object" index. | | | | | DEBUG_BACKTRACE_IGNORE_ARGS | | | | | | | Whether or not to omit the "args" index, and | | | thus all the function/method arguments, to save | | | memory. | | | | +-------------------------------+---------------------------------------------------+ Before 5.3.6, the only values recognized are TRUE or FALSE, which are the same as setting or not setting the DEBUG_BACKTRACE_PRO- VIDE_OBJECT option respectively. o $limit - As of 5.4.0, this parameter can be used to limit the number of stack frames returned. By default ($limit= 0) it returns all stack frames. RETURN VALUES
Returns an array of associative arrays. The possible returned elements are as follows: Possible returned elements from debug_backtrace(3) +---------+--------------------------------------+---+ | Name | | | | | | | | | Type | | | | | | | | Description | | | | | | +---------+--------------------------------------+---+ |function | | | | | | | | | | | | | string | | | | | | | | The current function name. See also | | | | __FUNCTION__. | | | | | | | line | | | | | | | | | | | | | integer | | | | | | | | The current line number. See also | | | | __LINE__. | | | | | | | file | | | | | | | | | | | | | string | | | | | | | | The current file name. See also | | | | __FILE__. | | | | | | | class | | | | | | | | | | | | | string | | | | | | | | The current class name. See also | | | | __CLASS__ | | | | | | | object | | | | | | | | | | | | | object | | | | | | | | The current object. | | | | | | | type | | | | | | | | | | | | | string | | | | | | | | The current call type. If a method | | | | call, "->" is returned. If a static | | | | method call, "::" is returned. If a | | | | function call, nothing is returned. | | | | | | | args | | | | | | | | | | | | | array | | | | | | | | If inside a function, this lists | | | | the functions arguments. If inside | | | | an included file, this lists the | | | | included file name(s). | | | | | | +---------+--------------------------------------+---+ CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.4.0 | | | | | | | Added the optional parameter $limit. | | | | | 5.3.6 | | | | | | | The parameter $provide_object changed to | | | $options and additional option DEBUG_BACK- | | | TRACE_IGNORE_ARGS is added. | | | | | 5.2.5 | | | | | | | Added the optional parameter $provide_object. | | | | | 5.1.1 | | | | | | | Added the current object as a possible return | | | element. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 debug_backtrace(3) example <?php // filename: /tmp/a.php function a_test($str) { echo " Hi: $str"; var_dump(debug_backtrace()); } a_test('friend'); ?> <?php // filename: /tmp/b.php include_once '/tmp/a.php'; ?> Results similar to the following when executing /tmp/b.php: Hi: friend array(2) { [0]=> array(4) { ["file"] => string(10) "/tmp/a.php" ["line"] => int(10) ["function"] => string(6) "a_test" ["args"]=> array(1) { [0] => &string(6) "friend" } } [1]=> array(4) { ["file"] => string(10) "/tmp/b.php" ["line"] => int(2) ["args"] => array(1) { [0] => string(10) "/tmp/a.php" } ["function"] => string(12) "include_once" } } SEE ALSO
trigger_error(3), debug_print_backtrace(3). PHP Documentation Group DEBUG_BACKTRACE(3)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy