Sponsored Content
Full Discussion: Problems with cut
Top Forums Shell Programming and Scripting Problems with cut Post 302189804 by namishtiwari on Monday 28th of April 2008 01:45:09 AM
Old 04-28-2008
Quote:
Originally Posted by scorpio
Hi
Thanks for the reply

But i cant trim my whitespaces from log files . i need to take that also..
becos parameters are set like
• 10 first characters: MSISDN
• 6 next characters: Hour
• 18 next characters: ID SA Source
• 18 next characters: ID SA Destination
This characters includes white spaces also
Code:
id=`echo 0680046755000011 3040249 3005930 60180GPRS4Samsung_SGH_Z500 | tr -s " " |cut -c17-35`
output is --- 3040249 3005930 60

 

3 More Discussions You Might Find Interesting

1. 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

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

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
WrapI18N(3pm)						User Contributed Perl Documentation					     WrapI18N(3pm)

NAME
Text::WrapI18N - Line wrapping module with support for multibyte, fullwidth, and combining characters and languages without whitespaces between words SYNOPSIS
use Text::WrapI18N qw(wrap $columns); wrap(firstheader, nextheader, texts); DESCRIPTION
This module intends to be a better Text::Wrap module. This module is needed to support multibyte character encodings such as UTF-8, EUC- JP, EUC-KR, GB2312, and Big5. This module also supports characters with irregular widths, such as combining characters (which occupy zero columns on terminal, like diacritical marks in UTF-8) and fullwidth characters (which occupy two columns on terminal, like most of east Asian characters). Also, minimal handling of languages which doesn't use whitespaces between words (like Chinese and Japanese) is supported. Like Text::Wrap, hyphenation and "kinsoku" processing are not supported, to keep simplicity. wrap(firstheader, nextheader, texts) is the main subroutine of Text::WrapI18N module to execute the line wrapping. Input parameters and output data emulate Text::Wrap. The texts have to be written in locale encoding. SEE ALSO
locale(5), utf-8(7), charsets(7) AUTHOR
Tomohiro KUBOTA, <kubota@debian.org> COPYRIGHT AND LICENSE
Copyright 2003 by Tomohiro KUBOTA This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-06-12 WrapI18N(3pm)
All times are GMT -4. The time now is 07:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy