Sponsored Content
Top Forums Shell Programming and Scripting Verifying sting format in bash Post 83668 by 98_1LE on Saturday 17th of September 2005 01:05:12 PM
Old 09-17-2005
I am sorry I did not make this clear. I need to split the date into those lines that match NNAAAA, and those that do not. For example:

Sample data:
aa1234
bb9876
root
nobody

Would produce one file or variable containing root and nobody, and another containing aa1234 and bb9876
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

bash date format

hi guys. in bash is there any other way of limiting the time displayed to HH:MM appart from (date +"%H:%M") and (date +"%R")? i want to input time into a database in the form HH:MM have tried NOW() but this gives me HH:MM:SS thanks in advance (1 Reply)
Discussion started by: vadharah
1 Replies

2. Shell Programming and Scripting

Extracting value from a sting using perl

Hi Experts, I want to extract the value of SESSIONID AND USERID from the this string using perl. XML Request },&quot;USER_PREF&quot;:{&quot;sys_lang&quot;:&quot;en-us&quot;,&quot;timezone&quot;:&quot;480&quot;,&quot;user_lang&quot;:&quot;en-us&quot;}}}</DEVICESIG></POLICYREQ>] The answer should be SessionID=1:3133050 and USERID=01451651 Please advise how... (3 Replies)
Discussion started by: namishtiwari
3 Replies

3. Shell Programming and Scripting

Assign a sting to a name?

i want to assign a anme for a string, i got the things below, but it doesn't work. MParc1=`` if then $MPrac1=`Prac1` # assign $MPrac1 to Prac1 else $MPrac1=`` #assigne $MPrac1 to nothing fi echo "${MPrac1} >>file Output: (if num is 0) Prac1 can you please... (6 Replies)
Discussion started by: mingming88
6 Replies

4. Programming

Java sting up path problem

Hi java programmers I'm a newbee to the Java. Could please help me to set the path correctly. I'm getting the following error. ----jGRASP exec: javac -g C:\Documents and Settings\bogugk\Desktop\HelloWorldApp.java ----jGRASP wedge2 error: command "javac" not found. ---- This command... (1 Reply)
Discussion started by: repinementer
1 Replies

5. Shell Programming and Scripting

How to grep sting (*) ?

Hi all, I am trying to grep something from log file. For example. i need to grep sting = "*834*1" My LOG 2010-05-05 09:27:57,649|3|ABCD834|192.168.38.72|2365|444850623031|0|8|-|0|*834*1*1499413*00853662524#|470540.7219101273026475158 2010-05-05... (3 Replies)
Discussion started by: ooilinlove
3 Replies

6. Shell Programming and Scripting

how to format a number in bash

Say I have a number x=123, but I want to it be x=000123, because I need to use it in as a file name. thanks! (2 Replies)
Discussion started by: aerosols
2 Replies

7. Shell Programming and Scripting

Inserting a string in another sting

Hi Experts, I need to insert a sting into another string at a specified position. Like the below. Regards, Tin-Tin (3 Replies)
Discussion started by: tinufarid
3 Replies

8. Shell Programming and Scripting

Replace sting in a file

Hi Gurus, I need to search and replace string <! in a file with a blank. Some how my command sed -i 's/\<\!\ is not working .. Kindly help (1 Reply)
Discussion started by: r_t_1601
1 Replies

9. Shell Programming and Scripting

Find and replace a string in group of sting

Hi, 1. I want to remove the line which contains "SUBPARTITION", but the condition is if line has ends with ")," replace with , else delete the line I was trying with the sed command i... (3 Replies)
Discussion started by: gavemani
3 Replies

10. Shell Programming and Scripting

Awk to search for sting in lines and then email.

I'm trying to use awk in a script to search for a string number in a plist file. basically its a plist that records the bandwidth usage, and if the number is greater than 3GB which is equals 3221225472 bytes, it will send me an alert by email. here is the file: =<?xml version="1.0"... (4 Replies)
Discussion started by: ivaldiz
4 Replies
bootparams(4)							   File Formats 						     bootparams(4)

NAME
bootparams - boot parameter data base SYNOPSIS
/etc/bootparams DESCRIPTION
The bootparams file contains a list of client entries that diskless clients use for booting. Diskless booting clients retrieve this infor- mation by issuing requests to a server running the rpc.bootparamd(1M) program. The bootparams file may be used in conjunction with or in place of other sources for the bootparams information. See nsswitch.conf(4). For each client the file contains an entry with the client's name and a list of boot parameter values for that client. Each entry has the form: clientname keyword=value... The first item of each entry is the host name of the diskless client. You can use the asterisk ('*') character as a "wildcard" in place of the client name in a single entry. A wildcard entry applies to all clients for which there is not an entry that specifically names them. In a given entry, the host name or asterisk is followed by one or more whitespace characters and a series of keyword--value pairs separated by whitespace characters. There must not be any whitespace within a keyword--value pair. Each keyword--value pair has the syntax: keyword=value The preceding form breaks out further as: keyword=server:value Where server can be null and value can be a pathname. An example that includes a server is: client1 root=server1:/export/client1/root An example where server is null is: client1 rootopts=:vers2 A minor variation of the keyword=value syntax is used for the domain keyword. Unlike the forms shown above, this syntax does not use a colon. For example: client1 domain=bldg1.workco.com Entries can span multiple lines. Use the backslash ('') character as the last character of a line to continue the entry to the following line. For multiple-line entries, you can split a line only in places where whitespace is allowed. For example, you can use a backslash to split the following entry between the end of the path (root) and the keyword domain: client1 root=server1:/export/client1/root domain=bldg1.workco.com In entries that specify a server, server is the name of the server that will provide the file or filesystem to the diskless client and value is the pathname of the exported file or filesystem on that server. In entries that use the domain keyword, the domain name specified must be the client's domain name. The algorithm for determining a client's domain name is to first check for a domain keyword in the client-specific entry and then in "wildcard" entry. If none is found, the server's domain name is used. For the JumpStart installation of machines that do not have video displays, use the term keyword to identify the terminal type of the boot server. Terminal types are listed in /usr/share/lib/terminfo (see terminfo(4)). An entry with the ns keyword associates a server (a name server) with, instead of a pathname, a specific name service (NIS+, NIS, LDAP, or none) and, if that server is not on a local subnet, the netmask needed to reach it. For example: ns=hoot:nisplus(255.255.255.0) An ns entry forces sysidtool(1M) to use the specified name service. By default, sysidtool uses NIS+ in preference to NIS or LDAP if it can find an NIS+ server for the system's domain on the subnet. An ns entry might be necessary if you are trying to set up a hands-off installa- tion, or if the name server is on a different subnet, which is common with NIS+. If an ns keyword is not used, sysidtool uses broadcast to attempt to bind to either a NIS+, NIS, or LDAP server. If a name server is not on the local subnet, which is possible for NIS+ or LDAP, the bind will fail, automatic configuration of the name service will fail, and an interactive screen is displayed, prompting the user to specify the name service. The ns keyword can be set in add_install_client or by Host Manager. EXAMPLES
Example 1: Sample bootparams Entry Here is an example of an entry in the bootparams file: client1 root=server1:/export/client1/root rootopts=:vers=2 domain=bldg1.workco.com client2 root=server2:/export/client2/root ns=:nis client3 root=server2:/export/client3/root ns=watson: client4 root=server2:/export/client4/root ns=mach:nisplus(255.255.255.0) Example 2: Sample Entry for JumpStart The following is an example of an entry that might be used for the JumpStart installation of diskless clients that do not have displays. mozart root=haydn:/export/install/sparc/os/latest/Solaris_9/boot install=haydn:/export/install/sparc/os/8.1/latest boottype=:in install_config=haydn:/usr/local/share/lib/jump-net ns=otis:nisplus(255.255.255.0) term=:xterms domain=eu.cte.work.com FILES
/etc/bootparams SEE ALSO
rpc.bootparamd(1M), sysidtool(1M), nsswitch.conf(4) NOTES
Solaris diskless clients use the keywords root and rootopts to look up the pathname for the root filesystem and the mount options for the root filesystem, respectively. These are the only keywords meaningful for diskless booting clients. See mount_ufs(1M). SunOS 5.10 22 Jul 2004 bootparams(4)
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy