I'm writing a script to create target and lun numbers for disks.
The script needs to start with a number and count to 7 printing the count. Then reset the second number to 0 and increment the first number and print the results.
It must be in hex too.
e.g.
0A 00
0A 01
0A 02
....
0A 07
0B 00
0B 01...
Hi all,
I have a file in the format:
14B
0
10
37 - this is going to be converted to hex
03B1
03B2
03B3
03B4 etc,
I want to assign the first 4 lines each to a variable
v1 v2 v3 v4
Then process the rest of the file using the variables to get the output
map dev 03B1 to dir 14B:0, target=10...
Hi I need a script that will take a file, number each line in the file and then append the line number on the end of the file in hex. Ideally I want to be able to add a set increment for the number i.e. add 25 onto each line number:
cat map_175_r2.txt|awk 'NR{ $0 $0=++b+24 };{print}'|pg
This...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.