I have following entries in a file.
I want to toggle the entry of 2nd column. TRUE/FALSE
i tried using
but the problem is, if instead of "tab" space after 1st column, there is a character or multi character space then this won't work.
Entries in the below file is like:
Pls help, if i can use any other editor "sed", "awk" etc.(but i am not too familiar with these)
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
I have several files that are being generated every 20 minutes. Each file contains 2 columns. The 1st column is Text, 2nd column is Data.
I would like to generate one single file from all these files as follows:
One instance of 1st column Text, followed by 2nd column Data separated by... (5 Replies)
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
Hi All,
Please help i have written an ksh script, where i am actually take count of lines in one file and want to update this count to 2nd field of a new file and apend the this into an existing file.
Note the below script is in for loop
-------- I am apending few records in a file... (7 Replies)
Hi Gurus,
I have file content sample:
,5113955056,,TAgent-Suspend
,5119418233,,TAgent-Suspend
,5102119078,,TAgent-Suspend
filenames 120229H5_suspend, 120229H6_unsuspend
I receive those files one of directory /home/temp/
I need following:
1. Backup first /home/temp/ file to... (5 Replies)
I have following entries file abc.txt
abc83.out.remote TRUE
abc84.out.remote TRUE
abc85.out.remote TRUE
abc86.out.remote TRUE
Please help me, how do i toggle the entries listed in 2nd column based on the search patterns (abcxx)
abcxx, i can get... (14 Replies)
I have a csv file formatted like this:
2014-08-21 18:06:26,A,B,12345,123,C,1232,26/08/14 18:07and I'm trying to change it to MM/DD/YYYY HH:MM for both occurances.
I have got this:
awk -F, 'NR <=1 {print;next}{"date +%d/%m/%Y\" \"%H:%m -d\""$1 "\""| getline dte;$1=dte}1' OFS="," test.csvThis... (6 Replies)
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
LEARN ABOUT PHP
variant_xor
VARIANT_XOR(3) 1 VARIANT_XOR(3)variant_xor - Performs a logical exclusion on two variantsSYNOPSIS
mixed variant_xor (mixed $left, mixed $right)
DESCRIPTION
Performs a logical exclusion.
PARAMETERS
o $left
- The left operand.
o $right
- The right operand.
Note
As with all the variant arithmetic functions, the parameters for this function can be either a PHP native type (integer, string,
floating point, boolean or NULL), or an instance of a COM, VARIANT or DOTNET class. PHP native types will be converted to variants
using the same rules as found in the constructor for the "VARIANT" class. COM and DOTNET objects will have the value of their
default property taken and used as the variant value.
The variant arithmetic functions are wrappers around the similarly named functions in the COM library; for more information on
these functions, consult the MSDN library. The PHP functions are named slightly differently; for example variant_add(3) in PHP cor-
responds to VarAdd() in the MSDN documentation.
RETURN VALUES
Variant XOR Rules
+------------+--------------------+---+
|If $left is | | |
| | | |
| | If $right is | |
| | | |
| | then the result is | |
| | | |
+------------+--------------------+---+
| | | |
| TRUE | | |
| | | |
| | | |
| | TRUE | |
| | | |
| | | |
| | FALSE | |
| | | |
| | | |
| TRUE | | |
| | | |
| | | |
| | FALSE | |
| | | |
| | | |
| | TRUE | |
| | | |
| | | |
| FALSE | | |
| | | |
| | | |
| | TRUE | |
| | | |
| | | |
| | TRUE | |
| | | |
| | | |
| FALSE | | |
| | | |
| | | |
| | FALSE | |
| | | |
| | | |
| | FALSE | |
| | | |
| | | |
| NULL | | |
| | | |
| | | |
| | NULL | |
| | | |
| | | |
| | NULL | |
| | | |
+------------+--------------------+---+
SEE ALSO variant_or(3), variant_and(3).
PHP Documentation Group VARIANT_XOR(3)