10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am running under ubuntu18.04
My question is about awk.
inputfile
0wo010011oasasds sdjhsdjh=, u12812888
8jsjkahsjajnsanakn akjskjskj=, suhuhuhwx
kskkxmsnnxsnjxsnjxsnjjnjjdi=, 22878ssssss
Below code adds consecutive numbers when string = is found
run_code:
awk -F'=' -v OFS='='... (4 Replies)
Discussion started by: baris35
4 Replies
2. Shell Programming and Scripting
I have a variable that contains the number of a positional parameter. There is no way of knowing what number this may be, although it is guaranteed to correspond with a valid parameter.
In BASH I could just use ${@} to extract that argument. But in a Bourne shell the best I can come up with is... (3 Replies)
Discussion started by: mij
3 Replies
3. Shell Programming and Scripting
Hi All,
When passing parameters to a sheel script, the parameters are referenced by their positions such as $1 for first parameter, $2 for second parameter. these positional values can only have values ranging from $0-$9 (0,1,2,3...9).
I have a shell script meant to accept 20 parameters. for... (3 Replies)
Discussion started by: ogologoma
3 Replies
4. UNIX for Dummies Questions & Answers
I have a string of letters. (They happen to be DNA, not that it's relevant to the question.) For analysis purposes, I need to replace the information at some of the sites. I need to do this based on their position, not the information in that position.
I also need to ignore differences at other... (10 Replies)
Discussion started by: JFS
10 Replies
5. Shell Programming and Scripting
I already have accomplished this task using sed and arrays, but since I get the variable using awk, I figured I'd ask this question and maybe I can get a cleaner solution using strictly awk.. I just can't quite grasp it in awk.
Story: I'm automating the (re)configuration of network interfaces,... (3 Replies)
Discussion started by: System Shock
3 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I'm curious about what this community would think about this portion of a dhcpd.conf file:
subnet 192.168.1.0 netmask 255.255.255.0 {
...
...other parameters/options...
...
range 192.168.1.3 192.168.1.253
range 172.16.0.2 172.16.0.50
}
I tested this and dhcpd did not barf... (2 Replies)
Discussion started by: Keene44
2 Replies
7. IP Networking
Hi All,
I'm curious about what this community would think about this portion of a dhcpd.conf file:
subnet 192.168.1.0 netmask 255.255.255.0 {
...
...other parameters/options...
...
range 192.168.1.3 192.168.1.253
range 172.16.0.2 172.16.0.50
}
I tested this and dhcpd did not barf... (1 Reply)
Discussion started by: Keene44
1 Replies
8. Linux
Hi All,
I'm curious about what this community would think about this portion of a dhcpd.conf file:
subnet 192.168.1.0 netmask 255.255.255.0 {
...
...other parameters/options...
...
range 192.168.1.3 192.168.1.253
range 172.16.0.2 172.16.0.50
}
I tested this and... (1 Reply)
Discussion started by: Keene44
1 Replies
9. Shell Programming and Scripting
Hi .
I am new to Unix. So i have a tough time.
we are using Korn Shell. I have a scenario where i have three files namely
xxx01,xxx02,xxx03. Now when i write ls xxx*|wc -l output is 3. But then i write `ls $1|wc -l` and pass xxx* as positional parameter (sh yyy.sh xxx*)
output is xxx01. other... (1 Reply)
Discussion started by: vasuarjula
1 Replies
10. AIX
Hi .
I am new to Unix. So i have a tough time.
we are using Korn Shell. I have a scenario where i have three files namely
xxx01,xxx02,xxx03. Now when i write ls xxx*|wc -l output is 3. But then i write `ls $1|wc -l` and pass xxx* as positional parameter (sh yyy.sh xxx*)
output is xxx01. other... (1 Reply)
Discussion started by: vasuarjula
1 Replies