Sponsored Content
Top Forums Shell Programming and Scripting Use one loop to handle below code Post 302745707 by yanglei_fage on Tuesday 18th of December 2012 12:03:53 AM
Old 12-18-2012
Use one loop to handle below code

Code:
 mknod /dev/vda b 253 0
 mknod /dev/vda1 b 253 1
 mknod /dev/vda2 b 253 2
 mknod /dev/vda3 b 253 3

I know below code is ease to handle, but I don't know above code
Code:
 mknod /dev/vda1 b 253 1
 mknod /dev/vda2 b 253 2
 mknod /dev/vda3 b 253 3

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

the given code goes in infinite loop and does not increment variable i

code is as #!/bin/sh i=1; while do welcome $i times; i='expr $i+1'; done exit 0; (6 Replies)
Discussion started by: mrityunjay22
6 Replies

2. Shell Programming and Scripting

need loop clarification for the below code

for loop for string to check each path file count. can someone please help me out regarding this.. purpose is that it will gives the number of files inside the that directory.. i am bit confused in doing the loop for the above can someone plz fix. PATH1=/home/data1 PATH2=/home/data2... (2 Replies)
Discussion started by: mail2sant
2 Replies

3. Shell Programming and Scripting

Loop certain code to all files within directory

Hi all, Can somebody help me with this problem pls. I need to extract one specific line from each files in a folder and put the all lines extracted in a unique output file in the following format. line extracted, respective name of file, date of file. I´m, trying the part to extract... (3 Replies)
Discussion started by: cgkmal
3 Replies

4. Programming

Is my code in an Infinite Loop?

Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines of code or even what functions are being executed? Or is my best option to kill it with a dump? ... (5 Replies)
Discussion started by: marcus121
5 Replies

5. UNIX for Dummies Questions & Answers

Understanding Code in IF LOOP

Hello All, I would like to know and understand the difference between the below 3 IF loops and also if possible what are the different other parameters i could use other than those mentioed in the below lF LOOP conditions, appreciate your help. Thanks, Sam. (1 Reply)
Discussion started by: Ariean
1 Replies

6. Shell Programming and Scripting

Need code to ftp files in loop

I have files like this beginning from 082008 (MMYYYY) to 112010 (MMYYYY) I need to fetch this files through ftp in loop. How can I achieve it? I tried with the following code. But I'm not sure how to increment the month from 082008 to 112010. for i in {082008 .. 112010} ... (5 Replies)
Discussion started by: Gangadhar Reddy
5 Replies

7. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

This question might be silly but its confusing me a bit: What is the difference between handle to the thread HANDLE and thread identifier pthread_t? ---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ---------- Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

8. UNIX for Dummies Questions & Answers

Nested loop code

Greetings, Would anyone be able to tell me why this nested loop doesn't seem to work in any variation? for i in {1..8} do echo "i is "$i for j in {1..i} do echo "j is "$j done doneoutput is always along the lines of i is 1... (7 Replies)
Discussion started by: barnhillec
7 Replies

9. Shell Programming and Scripting

How to Return to a While Loop From The Bottom of Code?

Hello All, I was wondering how after processing a program down to the bottom of the program one can return to the only while loop in the program. Thanx, (5 Replies)
Discussion started by: techieg
5 Replies

10. Shell Programming and Scripting

Handle color code

p1=text1 p2=text2(in red color) when i am trying to replace $p1 with $p2, content of the file from text2 become red. so when i open that file using vi its showing color code before tex2. please suggest me how to omit that color code and make content of that file in default color? (1 Reply)
Discussion started by: Biplab
1 Replies
MEM(4)							     Linux Programmer's Manual							    MEM(4)

NAME
mem, kmem, port - system memory, kernel memory and system ports DESCRIPTION
mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even patch) the system. Byte addresses in mem are interpreted as physical memory addresses. References to nonexistent locations cause errors to be returned. Examining and patching is likely to lead to unexpected results when read-only or write-only bits are present. It is typically created by: mknod -m 660 /dev/mem c 1 1 chown root:kmem /dev/mem The file kmem is the same as mem, except that the kernel virtual memory rather than physical memory is accessed. It is typically created by: mknod -m 640 /dev/kmem c 1 2 chown root:kmem /dev/kmem port is similar to mem, but the I/O ports are accessed. It is typically created by: mknod -m 660 /dev/port c 1 4 chown root:mem /dev/port FILES
/dev/mem /dev/kmem /dev/port SEE ALSO
chown(1), mknod(1), ioperm(2) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 1992-11-21 MEM(4)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy