05-05-2005
Hi vgersh99,
The VARIABLE IS COMING FROM CONFIG FILE AND AT ANY STAGE I DON'T KNOW HOW MANY VARIABLES I CAN DECLARE IN THE READ STATEMENT. THIS MUST BE DONE DYNAMICALLY.
JINGI
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to use \r as a delimiter in the -d option of the cut comand .
Any help ?
Thanks in advance .
SD (5 Replies)
Discussion started by: shweta_d
5 Replies
2. Shell Programming and Scripting
Hi All,
How can i use the cut option to only output the number of rows, which is 2 is this case ? Pls note that the number of digit before the delimiter ":" is always varying.
$ grep -n uuu xxx
2:** xxx yyy gg 44 tt uuu 2007
$ (2 Replies)
Discussion started by: Raynon
2 Replies
3. Shell Programming and Scripting
Hi,
I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies
4. UNIX for Advanced & Expert Users
Is there a way to use a word as a delimiter with cut? Or is there a way to use sed or awk with a word as a delimiter? I don't care which program I use for a delimiter I just want to use a word as a delimiter. (2 Replies)
Discussion started by: cokedude
2 Replies
5. Shell Programming and Scripting
I need to cut or otherwise get the 4th and 5th position output of
for i in `date +%H` ; do vnstat --dumpdb | grep "h;$i" ; done
example output is:
h;13;1310318701;443;93
I only need ";443;93" from any given run of "for i in `date +%H` ; do vnstat --dumpdb | grep "h;$i" ; done"
Thanks... (3 Replies)
Discussion started by: Habitual
3 Replies
6. Shell Programming and Scripting
HI,
I have a file like below
"103865","103835","Zming","","Zhu","103965","Sunnyvale","US",
"116228","116227","Morlla","","Kowalski","113228","Paese "(Treviso)""IT"
I want to validate the 7th column which is below.
"Sunnyvale"
"Paese
In the above 7th column Paese is not ended with... (9 Replies)
Discussion started by: Krrishv
9 Replies
7. Shell Programming and Scripting
Hi all,
I have a number of strings like below:
//mnt/autocor/43°13'(33")W/
and i'm trying to get the numbers in this string, for example
431333
please help
thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies
8. Shell Programming and Scripting
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies
9. Shell Programming and Scripting
Hi All-
We have a file data as below with delimiter as |#|
10|#|20|#|ABC
13|#|23|#|PBC
If I want to cut the 2nd field out of this, below command is not working as multiple pipe is causing an issue , it seems
cut -f2 -d"|#|" <file_name>
can you please help to provide the correct command... (7 Replies)
Discussion started by: sureshg_sampat
7 Replies
10. Shell Programming and Scripting
Hi,
Variable1 = MKT1,MKT2,MKT3,MKT4
Now i want to store each of these value seperated by comma to a array and access each of the values. Also find out number of such values seperated by comma.
Variable1 can have any number of values seperated by comma.
Thanks :) (3 Replies)
Discussion started by: arghadeep adity
3 Replies
runit(8) System Manager's Manual runit(8)
NAME
runit - a UNIX process no 1
SYNOPSIS
runit
DESCRIPTION
runit must be run as Unix process no 1. It performs the system's booting, running, and shutdown in three stages:
STAGE 1
runit runs /etc/runit/1 and waits for it to terminate. The system's one time tasks are done here. /etc/runit/1 has full control of
/dev/console to be able to start an emergency shell if the one time initialization tasks fail. If /etc/runit/1 crashes, or exits 100, runit
will skip stage 2 and enter stage 3.
STAGE 2
runit runs /etc/runit/2, which should not return until system shutdown; if it crashes, or exits 111, it will be restarted. Normally
/etc/runit/2 starts runsvdir(8). runit is able to handle the ctrl-alt-del keyboard request in stage 2, see below.
STAGE 3
If runit is told to shutdown the system, or stage 2 returns, it terminates stage 2 if it is running, and runs /etc/runit/3. The systems
tasks to shutdown and possibly halt or reboot the system are done here. If stage 3 returns, runit checks if the file /etc/runit/reboot
exists and has the execute by owner permission set. If so, the system is rebooted, it's halted otherwise.
CTRL-ALT-DEL
If runit receives the ctrl-alt-del keyboard request and the file /etc/runit/ctrlaltdel exists and has the execute by owner permission set,
runit runs /etc/runit/ctrlaltdel, waits for it to terminate, and then sends itself a CONT signal.
SIGNALS
runit only accepts signals in stage 2.
If runit receives a CONT signal and the file /etc/runit/stopit exists and has the execute by owner permission set, runit is told to shut-
down the system.
if runit receives an INT signal, a ctrl-alt-del keyboard request is triggered.
SEE ALSO
runit-init(8), runsvdir(8), runsvchdir(8), sv(8), runsv(8), chpst(8), utmpset(8), svlogd(8)
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
runit(8)