I just need to add a static ID to each output record so the users will be able to tell which group records in combined flatfiles come from I have the static ID in a bourne variable. I tried
awk '{print "${GroupID}" $0}' infile > outfile
But I ended up with the string ${GroupID} instead of... (5 Replies)
Hi,
I am trying to read a FILE data type into a String data type, I tried to make the FILE* veriable just equal the String veriable but i get:
Conversion from 'FILE*' to 'String' is ambiguous
Has anyone got any idea?
Thanks (4 Replies)
I have a .dat file in unix and it keeps failing file validation on line x. How do I delete a data string from a .dat file in UNIX?
I tried the following:
sed -e 'data string' -e file name
and it telling me unrecognized command (4 Replies)
Hello everyone !
I need to get the data in a file into a string.
file1
1
2
3
4
5
I need to write a script where the file1 info is stored in a string (say variable s). So the output should be
1,2,3,4,5 or (1,2,3,4,5)
If i say
echo $s or print $s
output should be
1,2,3,4,5
or
... (7 Replies)
Please look into the example.
My source file is like,
00,57,3,2008-07-24 06:30:06
10,1,8025171,"1M00",17907023,2008-07-23 18:16:58
10,2,8025171,"1M00",17907023,2008-07-23 18:17:01
99,184
What should i do if i want output like...
hello,00,57,3,2008-07-24 06:30:06... (7 Replies)
Hi,
I'm new to shell scripting and require your help in achieving the requirement.
I have a data file which stores organization name as one of the column data in a csv data file.
Organization name stored in data file is: Canadian OU CAD
Sample Data file:
1,5,4,5,,
... (9 Replies)
Hi,
So I'm kinda new to shell scripts and the like. I've picked up quite a bit of use from browsing the forums here but ran into a new one that I can't seem to find an answer for.
I'm looking to parse/find a string AND the next 15 or so charachters that follow the string within a text file... (1 Reply)
Hi,
I have a file(input.txt) and trying to format as output.txt. See the attached file format.
Note: This is a windows file (DOS format) and the commands are also going to execute on windows.
Basically I am trying to capture all the data in between Local Group Memberships and Global Group... (10 Replies)
I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample:
iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113
In the above example i m considering only 5 ips but there could be many more.
Now i have a file which... (15 Replies)
Discussion started by: mohtashims
15 Replies
LEARN ABOUT PHP
gzdeflate
GZDEFLATE(3) 1 GZDEFLATE(3)gzdeflate - Deflate a stringSYNOPSIS
string gzdeflate (string $data, [int $level = -1], [int $encoding = ZLIB_ENCODING_RAW])
DESCRIPTION
This function compresses the given string using the DEFLATE data format.
For details on the DEFLATE compression algorithm see the document "DEFLATE Compressed Data Format Specification version 1.3" (RFC 1951).
PARAMETERS
o $data
- The data to deflate.
o $level
- The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default com-
pression level will be the default compression level of the zlib library.
o $encoding
- One of ZLIB_ENCODING_* constants.
RETURN VALUES
The deflated string or FALSE if an error occurred.
EXAMPLES
Example #1
gzdeflate(3) example
<?php
$compressed = gzdeflate('Compress me', 9);
echo $compressed;
?>
CHANGELOG
+--------+-----------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------+
| 5.4.0 | |
| | |
| | Added $encoding parameter. |
| | |
+--------+-----------------------------+
SEE ALSO gzinflate(3), gzcompress(3), gzuncompress(3), gzencode(3).
PHP Documentation Group GZDEFLATE(3)