10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Data file example
I look for primary and * to isolate the interesting slot number.
slot=`sed '/^primary$/,/\*/!d' filename | tail -1 | sed s'/*//' | awk '{print $1" "$2}'`
Now I want to get the Touch line for only the associate slot number, in this case, because the asterisk... (2 Replies)
Discussion started by: popeye
2 Replies
2. Shell Programming and Scripting
Hi. I have to swap the first and the third word in all lines of a txt file using sed.
Separators between words are: any charachter, except intervall.
I hope, you'll understand what I want to do. my english is not so good, sorry for that:) (10 Replies)
Discussion started by: T720
10 Replies
3. Shell Programming and Scripting
Hi all,
I have a vcd file with a bunch of lines containing an array, like this
$var wire 1 b a $end
$var wire 1 c a $end
$var wire 1 d a $end
$var wire 1 e a $end
$var wire 1 f b $end
$var wire 1 g b $end
$var wire 1 h b $end
$var wire 1 i b $end
I want it like this:
$var wire 1 e a... (12 Replies)
Discussion started by: veerabahu
12 Replies
4. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
5. Shell Programming and Scripting
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
6. Shell Programming and Scripting
Hi.
I may have mentioned in the OP to this thread that the AHK macro script I was trying to sort was, relative to its full length, only partly in the right format to be sorted by the methods discussed in that thread.
Now I'm looking to tackle the rest of the data in that AHK script.
... (2 Replies)
Discussion started by: SilversleevesX
2 Replies
7. Shell Programming and Scripting
This seems to be a question whose answer uses sed or awk.
For a file like:
a
b
c
d
e
How to swap the order of the line pairs, to end up with:
b
a
d
c
e
All lines from the original file need to wind up in the output file. (8 Replies)
Discussion started by: rd5817
8 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have to swap two consecutive line using sed in a file.
My text to swap is available in the file x.pl
#Create & map a common work library
if (!(-e "../work"))
{
system ("vlib work ../work");
system ("vmap work ../work");
}
system ("vsimsa -do thiagu_dec.do");
In this i... (6 Replies)
Discussion started by: adharmalingam
6 Replies
9. HP-UX
Hi
I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system:
- I would like to know when does the memory swap space spill over to the device swap space?
- And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies
10. Shell Programming and Scripting
Hello. There is something I can not manage : I want to swap the first word with the third one in every line. No file is given the input is read from the keyboard. I know I have to use sed, but it seems this is too complicated for me. Could you help me please ?
Thanks,
atticus (9 Replies)
Discussion started by: atticus
9 Replies