It's difficult to believe that your method applied to the given input yields the output presented.
Wildly guessing and imaginatively extrapolating, I came up with
Please test and come back with th results.
The other issue is the error messages are being printed to stderr (fd 2), not stdout (fd 1) which might be the only one redirected.
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi All,
I have just now started learning awk from the source - Awk - A Tutorial and Introduction - by Bruce Barnett
and the bad part is that I am stuck on the very first example for running the awk script.
The script is as -
#!/bin/sh
# Linux users have to change $8 to $9
awk '
BEGIN ... (6 Replies)
The system don't boot.
on the screen appears following:
press enter to maintenance (or type CTRL-D to continue)...I checked with format command.
... the slices "0-root","1-swap","2-backup" exist.
...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT OSX
iconv
ICONV(1) Linux Programmer's Manual ICONV(1)NAME
iconv - character set conversion
SYNOPSIS
iconv [OPTION...] [-f encoding] [-t encoding] [inputfile ...]
iconv -l
DESCRIPTION
The iconv program converts text from one encoding to another encoding. More precisely, it converts from the encoding given for the -f
option to the encoding given for the -t option. Either of these encodings defaults to the encoding of the current locale. All the input-
files are read and converted in turn; if no inputfile is given, the standard input is used. The converted text is printed to standard out-
put.
The encodings permitted are system dependent. For the libiconv implementation, they are listed in the iconv_open(3) manual page.
Options controlling the input and output format:
-f encoding, --from-code=encoding
Specifies the encoding of the input.
-t encoding, --to-code=encoding
Specifies the encoding of the output.
Options controlling conversion problems:
-c When this option is given, characters that cannot be converted are silently discarded, instead of leading to a conversion error.
--unicode-subst=formatstring
When this option is given, Unicode characters that cannot be represented in the target encoding are replaced with a placeholder
string that is constructed from the given formatstring, applied to the Unicode code point. The formatstring must be a format string
in the same format as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer
argument.
--byte-subst=formatstring
When this option is given, bytes in the input that are not valid in the source encoding are replaced with a placeholder string that
is constructed from the given formatstring, applied to the byte's value. The formatstring must be a format string in the same format
as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer argument.
--widechar-subst=formatstring
When this option is given, wide characters in the input that are not valid in the source encoding are replaced with a placeholder
string that is constructed from the given formatstring, applied to the byte's value. The formatstring must be a format string in the
same format as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer argument.
Options controlling error output:
-s, --silent
When this option is given, error messages about invalid or unconvertible characters are omitted, but the actual converted text is
unaffected.
The iconv -l or iconv --list command lists the names of the supported encodings, in a system dependent format. For the libiconv implementa-
tion, the names are printed in upper case, separated by whitespace, and alias names of an encoding are listed on the same line as the
encoding itself.
EXAMPLES
iconv -f ISO-8859-1 -t UTF-8
converts input from the old West-European encoding ISO-8859-1 to Unicode.
iconv -f KOI8-R --byte-subst="<0x%x>"
--unicode-subst="<U+%04X>"
converts input from the old Russian encoding KOI8-R to the locale encoding, substituting an angle bracket notation with hexadecimal
numbers for invalid bytes and for valid but unconvertible characters.
iconv --list
lists the supported encodings.
SEE ALSO iconv_open(3)GNU January 22, 2006 ICONV(1)