![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| scp is slow | tomstone_98 | UNIX for Dummies Questions & Answers | 1 | 07-26-2007 09:33 AM |
| Slow FTP & SMB | rockboles | UNIX for Dummies Questions & Answers | 4 | 12-11-2005 07:52 PM |
| ls -l over NFS slow | keelba | UNIX for Advanced & Expert Users | 3 | 01-21-2004 08:17 AM |
| CPU slow down | Henrik | UNIX for Dummies Questions & Answers | 4 | 11-21-2002 05:26 AM |
| slow ftp | suntan | UNIX for Dummies Questions & Answers | 3 | 07-16-2001 09:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Cut too slow
Hi I am using a cut command in the script which is slowing down the performance of the script .can anyone suggest the other ways of doing the same cut command
Record_Type=`echo "$line" | cut -c19-20` *******this is slowing down********* i have 4 more cut commands 2 in one loop and 2 in inner looop can I replace cut with anyother functionalities Do help me on this thanks |
|
||||
|
Quote:
![]() |
|
|||||
|
I'd agree with drl, but a possible alternative (if using bash) is to use parameter expansion, for example:
Code:
line="this_is_a_test"
echo "$line" | cut -c6-9
echo "${line:5:4}"
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|