Visit Our UNIX and Linux User Community


cut


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cut
# 1  
Old 08-04-2009
cut


A data looks like this... which is of single line...
Code:
'[ [issuedTo CN= Class 1 Public Certification Authority , OU="(c) , Inc. - For authorized use only", OU= Trust Network, O=" , Inc.", C=US] [fingerPrint [ )] [serialNumber ] [alias class 1 public primary certification authority - g] [validity Valid from .] [version 1] [issuedBy CN= Class 1 Public Primary Certification Authority - ="(c)  , Inc. - For authorized use only", OU= Trust Network, O=" , Inc.", C=US] [ ] ]\n[ [issuedTo CN= - ,OU="(c) , Inc. - For use only", OU= Trust Network, O=" , Inc.",] []

i want to cut this line... when ever "[issuedTo" comes in this line as two separate lines ...

Request for the assistance...

Last edited by zaxxon; 08-04-2009 at 07:46 AM.. Reason: CODE tags
# 2  
Old 08-04-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

*********************************************************

Something like this?
Code:
sed 's/\[issuedTo/\n\[issuedTo/g' infile


Previous Thread | Next Thread
Test Your Knowledge in Computers #826
Difficulty: Medium
JSON is a language-independent data format.
True or False?

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using :<<cut / cut to comment out block of bash script

I am using : << cut / cut to comment out block of code. Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines. The "warning " is at last line of script. done < results 169 echo "END read all positioning parameters" 170... (8 Replies)
Discussion started by: annacreek
8 Replies

2. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies

3. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

Featured Tech Videos