I have to replace a field in one file with a field from other file.
I came across this awk command to replace a field with one string
nawk -F'|' -v OFS='|' '$2="replace"' temp2 > temp3
I need to have something like cut -f2 -d "|" temp1 (a field from other file) instead of 'replace'
Is... (8 Replies)
Howdy.
I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited?
Example:
You are... (3 Replies)
hi
i have file as below , i want to add duplicate records like bell_bb to one record with valuve as 15 ( addition of both )
any oneline awk script to achive this ?
header 0
CAMPAIGN_NAME 1
Bell_BB 14
Bell_MONTHLY 803
SOLO_UNBEATABLE 644
Bell_BB 1
Bell_MONTHLY 25
SOLO_UNBEATABLE... (4 Replies)
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
Hi,
I am trying with the below Perl command to print the first field when the second field matches the given pattern:
perl -lane 'open F, "< myfile"; for $i (<F>) {chomp $i; if ($F =~ /patt$/) {my $f = (split(" ", $i)); print "$f";}} close F' dummy_file
I know I can achieve the same with the... (7 Replies)
Hi all,
I have a requirement to replace a field with a character as per the length of the field.
Suppose i have a file where second field is of 20 character length. I want to replace second field with 20 stars (*). like ********************
As the field is not a fixed one, i want to do the... (2 Replies)
I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below:
column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10
"12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
node.perms
NODE.PERMS(5) Linux Programmer's Manual NODE.PERMS(5)NAME
node.perms - LinuxNode permissions file.
DESCRIPTION
Node.perms file is read at program startup with the knowledge of users username (call), connection type (AX.25, NET/ROM, ROSE, TCP/IP),
peers IP address (for TCP/IP) and port name (for AX.25). The first entry matching this information is taken and user is asked for password
and given permissions according to it.
The lines within node.perms must either be a comment line, which starts with a # in the first column, or a permission entry in the follow-
ing format, each field being delimited by white space:
username type portname password permissions
The field descriptions are:
username This is matched against users username (call) without SSID. An asterisk (*) matches any username.
type This is matched against the type of the connection to user. Possible values for this field are:
* matches any type of connection.
ax25 matches users coming in with AX.25.
netrom matches users coming in with NET/ROM.
rose matches users coming in with ROSE.
local matches TCP/IP connections where users host is in "local" network as defined in node.conf(5).
ampr matches TCP/IP connections where users host is in amprnet (44.0.0.0/8).
inet matches TCP/IP connections where users host is neither in "local" network nor in amprnet.
host matches users starting LinuxNode from shell.
portname If user is coming in with AX.25 this field is matched against the local port name the user is coming in via. An asterisk (*)
matches any port name.
password If the previous tree fields match and this field is not a single asterisk (*) the user is asked for a password. The password
is then matched against this field.
permissions This field represents a a bitmask of operations the user is permitted to do. It is a sum of the values listed here:
1 permits logging in even if no other permissions are given.
2 permits outgoing AX.25 connects.
4 permits outgoing NET/ROM connects.
8 permits telneting to hosts in the "local" network as defined in node.conf(5).
16 permits telneting to hosts in amprnet.
32 permits telneting to hosts neither in the "local" network nor in amprnet.
64 permits using hidden ports in outgoing AX.25 connections. (See HiddenPorts command in node.conf(5).)
128 permits outgoing ROSE connects.
256 The no-escape flag. Disables the escape mechanism for this user.
FILES
/etc/ax25/node.perms
SEE ALSO node(8), node.conf(5), axports(5), ax25(4).
Linux 16 June 1999 NODE.PERMS(5)