Search Results

Search: Posts Made By: lookoo
124,121
Posted By Optimus_P
or how about sed. x=`echo $i|sed s/.$//`
or how about sed. x=`echo $i|sed s/.$//`
124,121
Posted By Bashar
with vi its possible :%s/.$//g this...
with vi its possible

:%s/.$//g

this will delete every last char on each line.
124,121
Posted By oombera
This is a continuation of this post...
This is a continuation of this post (https://www.unix.com/showthread.php?s=&threadid=10131).

You can use this if you use ksh:

someVar=`awk '{ printf $2 ";" }' file`; someVar=${someVar%;}
...
124,121
Posted By Perderabo
If you're using ksh, you can strip off the last...
If you're using ksh, you can strip off the last character like this:
x=${x%?}
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 01:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy