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 NETBSD
ifconfig.if
IFCONFIG.IF(5) BSD File Formats Manual IFCONFIG.IF(5)NAME
ifconfig.if -- interface-specific configuration files or variables
DESCRIPTION
The ifconfig.if files or variables contain information regarding the configuration of each network interface. ifconfig.if is processed by
/etc/rc.d/network at system boot time.
For each interface (nnX) that is to be configured, there should be either an ifconfig_nnX variable in rc.conf(5), or an /etc/ifconfig.nnX
file (such as the ifconfig_fxp0 variable or the /etc/ifconfig.fxp0 file for the fxp0 interface). Only characters allowed in sh(1) variables
names should be used for nnX (ascii(7) uppercase and lowercase letters, digits, and underscore).
The variable or file will get evaluated only if the interface exists on the system. Multiple lines can be placed in a variable or file, and
will be evaluated sequentially. In the case of a variable, semicolons may be used instead of newlines, as described in rc.conf(5).
<backslash><newline> sequences in files are ignored, so long logical lines may be made up of several shorter physical lines.
Normally, a line will be evaluated as command line arguments to ifconfig(8). ``ifconfig nnX'' will be prepended on evaluation. Arguments
with embedded shell metacharacters should be quoted in sh(1) style.
If the line is equal to ``dhcp'', dhcpcd(8) will be started for the interface. However, it is instead recommended that dhcpcd is set to true
in rc.conf(5) and any per interface configuration or restriction is done in dhcpcd.conf(5).
If a line is empty, or starts with '#', the line will be ignored as comment.
If a line starts with '!', the rest of line will get evaluated as shell script fragment. Shell variables declared in /etc/rc.d/network are
accessible but may not be modified. The most useful variable is $int, as it will be bound to the interface being configured with the file.
For example, the following illustrates static interface configuration:
# IPv4, with an alias
inet 10.0.1.12 netmask 255.255.255.0 media 100baseTX
inet 10.0.1.13 netmask 255.255.255.255 alias
# let us have IPv6 address on this interface
inet6 2001:db8::1 prefixlen 64 alias
# have subnet router anycast address too
inet6 2001:db8:: prefixlen 64 alias anycast
The following illustrates dynamic configuration setup with dhclient(8) and rtsol(8):
up
# autoconfigure IPv4 address
!dhclient $int
# autoconfigure IPv6 address. Be sure to set $ip6mode to autohost.
!rtsol $int
The following example sets a network name for a wireless interface (using quotes to protect special characters in the name), and starts
dhcpcd(8):
ssid 'my network'
dhcp
The following example is for dynamically-created pseudo interfaces like gif(4). Earlier versions of /etc/rc.d/network required an explicit
'create' command for such interfaces, but creation is now handled automatically.
up
# configure IPv6 default route toward the interface
!route add -inet6 default ::1
!route change -inet6 default -ifp $int
FILES
/etc/rc.d/network
SEE ALSO rc.conf(5), ifconfig(8)BSD April 7, 2011 BSD