08-27-2010
First of all thanks for the quick response.
This looks complicated.I was thinking there would be a simple command something like % which matches the braces.
My IF - ELSE - FI block is well over 800 lines,I am still not sure how I could find the matching FI by running your code.Apologize if I did not understand your code
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
i have a program where i have to get a character from the user and check it against the word i have and then replace the character in a blank at the same position it is in the word. (7 Replies)
Discussion started by: nehaquick
7 Replies
2. UNIX for Dummies Questions & Answers
Can anyone give a sample example of comparing two strings using matching concept in unix shell programming.
say we have two strings,S1 = ravi and S2 = kiran
how can i use matching concept to compare S1 and S2
Can anyone please help me. (2 Replies)
Discussion started by: veerumahanthi41
2 Replies
3. UNIX for Dummies Questions & Answers
Hi Folks,
I have the following requirement:
I have a file that is containing numerous queries. The tables name mentioned in the queries are in the following format : SchemaName.Tablename. e.g COPDB.TableName.
I need to take out all the COPDB.TableName pattern and write it to a different... (0 Replies)
Discussion started by: Siv_Pat
0 Replies
4. Shell Programming and Scripting
Hi Folks,
I have the following requirement:
I have a file that is containing numerous queries. The tables name mentioned in the queries are in the following format : SchemaName.Tablename. e.g COPDB.TableName.
I need to take out all the COPDB.TableName pattern and write it to a different... (6 Replies)
Discussion started by: Siv_Pat
6 Replies
5. Shell Programming and Scripting
Hello all,
simple matching and if not match problem that i can't figure out.
file1
hostname:
30 10 * * * /home/toto/start PROD instance_name1 -p
00 9 * * * /home/toto/start PROD instance_name2 -p
15 8 * * * /home/toto/start PROD instance_name3 -p
hostname2:
00 8 * * *... (5 Replies)
Discussion started by: maverick72
5 Replies
6. Shell Programming and Scripting
hello all,
this is probably very simple for you guys but i am trying to achive something like below...i have 2 files...file 1 has entries like below
DB1:NS
DB2:NS
DB3:NS
DB4
DB5:NS
and file2 as below
DB1
DB2
DB5
i was to write a loop statment were if there is a matching... (1 Reply)
Discussion started by: abdul.irfan2
1 Replies
7. Shell Programming and Scripting
Hi guys
I am trying to create a regular expression to match a word with the following pattern:
any letter(one or more occurence) followed by a digit(one or more occurence) followed by any letter(one or more occurence)
I have tried the following regex but it fails to find what I need:
$... (4 Replies)
Discussion started by: aoussenko
4 Replies
8. Shell Programming and Scripting
Hi, I have text file:
Name: xyz
Gender: M
Address: "120_B_C; ksilskdj; lsudlfw"
Zip: 20392
Name: KLM
Gender: F
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value
The Address value in quotes... (1 Reply)
Discussion started by: ysrini
1 Replies
9. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
10. Shell Programming and Scripting
Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :).
file
20161109104500.0+0000,x,5631
20161109104500.0+0000,y,2
20161109104500.0+0000,z,2
20161109104500.0+0000,a,4117... (3 Replies)
Discussion started by: cmccabe
3 Replies
machid(1) General Commands Manual machid(1)
NAME
machid: hp9000s200, hp9000s300, hp9000s400, hp9000s500, hp9000s700, hp9000s800, hp-mc680x0, hp-pa, pdp11, u370, u3b, u3b10, u3b2, u3b5, vax
- provide truth value about processor type
SYNOPSIS
DESCRIPTION
The following commands return a true value (exit code 0) if the a processor type matches the command name. Otherwise a false value (exit
code nonzero) is returned. These commands are commonly used within makefiles and shell procedures to improve portability of applications
(see make(1)).
+-----------+-------------------------++--------+--------------------------+
|Command | True for ||Command | True for |
+-----------+-------------------------++--------+--------------------------+
|hp9000s200 | Series 200 ||pdp11 | PDP-11/45 or PDP-11/70 |
|hp9000s300 | Series 300 ||u3b | 3B20 computer |
|hp9000s400 | Series 400 ||u3b2 | 3B2 computer |
|hp9000s500 | Series 500 ||u3b5 | 3B5 computer |
|hp9000s700 | Series 700 ||u3b10 | 3B10 computer |
|hp9000s800 | Series 800 or 700 ||u370 | IBM System/370 computer |
|hp-mc680x0 | Series 200, 300, or 400 ||vax | VAX-11/750 or VAX-11/780 |
|hp-pa | Series 700 or 800 || | |
+-----------+-------------------------++--------+--------------------------+
EXAMPLES
Given a shell script that must behave differently when run on an HP 9000 Series 700 or 800 system, select the correct code segment to be
executed:
WARNINGS
always returns true on both Series 800 and Series 700 systems. Therefore, when using this command in scripts to determine hardware type,
always use both and in the appropriate sequence to ensure correct results (see
machid(1) will no longer provide support for future machines beyond the Series 800 and Series 700 systems. Decisions should be based on
the hardware and software configuration information returned by getconf(1).
SEE ALSO
getconf(1), make(1), sh(1), test(1), true(1).
machid(1)