I need to extract the character before the last "|" in the following lines, which are 'N' and 'U'. The last "|" shouldn't be extracted. Also the no.s of "|" may vary in a line, but I need only the character before the last one.
... (1 Reply)
Hi,
this might be a basic question...
why is that wc -c counts 1 more per line than what is there.
for example,
> cat dum1.txt
123
12
> wc -c dum1.txt
7 dum1.txt
Thanks,
Sameer. (4 Replies)
Hi all,
I want to remove last n char in every line. I'm having the comment as,
cnt=10
cat filename | rev | cut -c $cnt- | rev
I want to have it with sed or awk or any command except perl. Pls help me in the comment. I have tried few options using sed. But not able to get it.
... (7 Replies)
I'm trying to add a '1' before a line that has the word "C_ID"
s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please. (5 Replies)
Hello experts,
I need to convert one file into readable format.
Input file is like following line.
STG,12345,000,999,' PQR, 2345,000,999,' XYZ,7890,000,999,
Output should be following (After ' char new line char should be added.)
STG,12345,000,999,'
PQR, 2345,000,999,' ... (16 Replies)
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 Replies)
Hi folks,
I am self-learning as I can
I have a script that has read a file into an array.
I can read out each line in the array with the code:
for INDEX in {0..$LENGTH} ## $LENGTH was determined at the read in
do
echo "${data}"
done
What I need to do is test the first char... (2 Replies)
Hi,
my file has below details and I want remove the # char from only specific line.
#TEST:00:START
#TEST1:01:INPROCESS
#TEST2:02:ABOUTTO
#TEST3:03:COMP
i.e if want remove the # from 2nd line then file to be updated as
#TEST:00:START
TEST1:01:INPROCESS
#TEST2:02:ABOUTTO... (6 Replies)
Hi Gurus,
I need separate one file which is one huge line to mutiple line.
file like
abcd # bcd # def # fge # ged
I want to get
abcd
bcd
def
fge
ged
Thanks in advance (4 Replies)
Discussion started by: ken6503
4 Replies
LEARN ABOUT PHP
inet_type
inet_type(4) File Formats inet_type(4)NAME
inet_type - default Internet protocol type
SYNOPSIS
/etc/default/inet_type
DESCRIPTION
The inet_type file defines the default IP protocol to use. Currently this file is only used by the ifconfig(1M) and netstat(1M) commands.
The inet_type file can contain a number of <variable>=<value> lines. Currently, the only variable defined is DEFAULT_IP, which can be
assigned a value of IP_VERSION4, IP_VERSION6, or BOTH.
The output displayed by the ifconfig and netstat commands can be controlled by the value of DEFAULT_IP set in inet_type file. By default,
both commands display the IPv4 and IPv6 information available on the system. The user can choose to suppress display of IPv6 information by
setting the value of DEFAULT_IP. The following shows the possible values for DEFAULT_IP and the resulting ifconfig and netstat output that
will be displayed:
IP_VERSION4 Displays only IPv4 related information. The output displayed is backward compatible with older versions of the ifconfig(1M)
and netstat(1M) commands.
IP_VERSION6 Displays both IPv4 and IPv6 related information for ifconfig and netstat.
BOTH Displays both IPv4 and IPv6 related information for ifconfig and netstat.
The command-line options to the ifconfig and netstat commands override the effect of DEFAULT_IP as set in the inet_type file. For example,
even if the value of DEFAULT_IP is IP_VERSION4, the command
example% ifconfig -a6
will display all IPv6 interfaces.
EXAMPLES
Example 1: Suppressing IPv6 Related Output
This is what the inet_type file must contain if you want to suppress IPv6 related output:
DEFAULT_IP=IP_VERSION4
SEE ALSO ifconfig(1M), netstat(1M)SunOS 5.10 16 Jun 1999 inet_type(4)