Sponsored Content
Top Forums Shell Programming and Scripting BASH: Break line, read, break again, read again... Post 302520156 by pravin27 on Friday 6th of May 2011 02:42:14 AM
Old 05-06-2011
Could this help you?
Code:
 echo 'example.jpg:QVC,honeywell-labs.com,COM,blah' | awk -F"[:,]" '{for(i=1;i<=NF;i++) { print "fld"i,"-",$i}}'

This User Gave Thanks to pravin27 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

TO break a line

hi All, Have a doubt in ksh..Am not familiar with arrays but i have tried out a script.. plzzzzz correct me with the script My i/p File is: (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = 192.168.2.2) (Port = 1525) ) ) (CONNECT_DATA = (SID = TESTDB1) ) ) ... (7 Replies)
Discussion started by: aajan
7 Replies

2. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

3. Shell Programming and Scripting

break while loop in BASH

Hi gurus, I have the following part of code which I am using for treating input #!/bin/bash while ]; do arg=$1; shift case $arg in -u) users="$1" shift ;; -g) groups="$1" shift ;; ... (4 Replies)
Discussion started by: wakatana
4 Replies

4. Shell Programming and Scripting

bash: read file line by line (lines have '\0') - not full line has read???

I am using the while-loop to read a file. The file has lines with null-terminated strings (words, actually.) What I have by that reading - just a first word up to '\0'! I need to have whole string up to 'new line' - (LF, 10#10, 16#A) What I am doing wrong? #make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies

5. Shell Programming and Scripting

Insert line break

Dear All, thanks in advance input file 410530AAANNNNNAAA410530JJJJJJYYYY410530PPPPPAAAAAA........... I want output like 410530AAANNNNNAAA 410530JJJJJJYYYY 410530PPPPPAAAAAA Thanks (10 Replies)
Discussion started by: The_Archer
10 Replies

6. Shell Programming and Scripting

Multiple line break

Hi, We had an issue with one file. Each line in the file is a record in which there will be 6 fields each separated by ; Problem is some lines are broken into pieces. like a;b; c; d; e;f instead of a;b;c;d;e;f I have filtered out all the broken lines from the original file and wrote to... (6 Replies)
Discussion started by: anjuvr
6 Replies

7. UNIX for Dummies Questions & Answers

VI Line Break?

So I'm in a Unix class and our assignment was to go into VI and write a script to make this file tree. At the end of it, I'd like it to echo "This is the file tree you've created" then a line break, then . But I'm not sure as to who to do it. Is there a way for when I run it (./filesystem), the... (4 Replies)
Discussion started by: bbowers
4 Replies

8. Shell Programming and Scripting

How to break the line to the one above?

Hello everyone! I'm trying to make the below file1 look like file2, can anyone help? Basically I just hit backspace on every line that starts with a number. Thanks! file1: THIS#IS-IT1 4 THIS#IS-IT2 3 THIS#IS-IT3 2 THIS#IS-IT4 1 Result > file2: (4 Replies)
Discussion started by: demmel
4 Replies

9. UNIX for Dummies Questions & Answers

Script to break up file (write new files) in bash

Hello experts, I need help writing individual files from a data matrix, with each new file being written every time there is a blank line: From this cat file.txt col1 col2 col3 6661 7771 8881 6661 7771 8881 6661 7771 8881 col1 col2 col3 3451 2221 1221... (6 Replies)
Discussion started by: torchij
6 Replies
rbacdbchk(1M)															     rbacdbchk(1M)

NAME
rbacdbchk - Verifies the syntax of the Role-Based Access Control (RBAC) database files SYNOPSIS
DESCRIPTION
verifies that there are no conflicting or inconsistent entries in and amongst the RBAC database files. also checks the syntax of the data- base files and prints messages indicating which lines contain errors. returns zero output if no errors are present in the database files. All the RBAC database files and are verified. See rbac(5) for more information on these RBAC database files. Options supports the following options: Checks the database. Checks the database. Checks the database. Checks the database. Checks the database. Cross reference checks all databases. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. International Code Set Support Single-byte character code set is supported. RETURN VALUE
0. Success 1. Incorrect syntax EXAMPLES
The following example finds an error that user is an invalid user # rbacdbchk [/etc/rbac/user_role] John: Administrator invalid user The value 'John' for the Username field is bad. The following example finds a syntax error, an extra colon at the end of a line: # rbacdbchk [/etc/rbac/user_role] root: Administrator: invalid name: Not alphanumeric The value 'Administrator:' for the Rolename field is bad. [Role in role_auth DB with no assigned user in user_role DB] Administrator:(hpux.*, *) The following example finds a field missing: # rbacdbchk [/etc/rbac/roles] : my comment invalid name: <empty> The value '' for the Rolename field is bad. The following example finds a bad role: # rbacdbchk [Role in role_auth DB with no assigned user in user_role DB] blah:(hpux.*, *) [Invalid Role in role_auth DB. Role 'blah' does not exist in the roles DB] blah:(hpux.*, *) The following example finds a bad group name: # rbacdbchk [/etc/rbac/user_role] &blah: Administrator invalid group The value 'blah' for the Group name field is bad. FILES
Database containing valid definitions of all roles. Database containing definitions of all valid authorizations. Database specifying the roles for each specified user. Database that defines the authorizations for each role. Database containing the authorization to execute specified commands, and the privileges to alter uid and gid for command execution. Database that defines the role-to-authorization to audit SEE ALSO
authadm(1M), cmdprivadm(1M), privrun(1M), rbac(5). rbacdbchk(1M)
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy