Sponsored Content
Top Forums Shell Programming and Scripting Stripping of a symbol from string not working properly Post 302615031 by Klashxx on Thursday 29th of March 2012 06:20:07 AM
Old 03-29-2012
At shell processing at least you need to escape the variable:
Code:
# a="$980"                     
# echo $a
80

Code:
# a="\$980"
# echo $a  
$980

 

10 More Discussions You Might Find Interesting

1. Programming

y is this not working properly?

#include <stdio.h> #include <sys/types.h> #include <string.h> #include <sys/stat.h> #include <unistd.h> struct stat s; main() { char c; if (fork()==0) { system("clear"); do { printf("myAI\\>§ "); scanf("%s",c); if(stat(c,&s)>-1) {... (3 Replies)
Discussion started by: C|[anti-trust]
3 Replies

2. UNIX for Dummies Questions & Answers

Stripping a portion of string from behind!!!

Hi, How to strip a portion of a file name from behind...Say for Eg..i have a file name like aaaaa.bbbbb.Mar-17-2007 i want to remove .Mar-17-2007...is there a one line command which can give this output... Thanks Kumar (5 Replies)
Discussion started by: kumarsaravana_s
5 Replies

3. Shell Programming and Scripting

stripping leftmost characters from string

Hi there, if i have some strings ie test_324423 test_242332 test_767667 but I only want the number part (the bolded bit) how do I strip the leftmost 5 characters from the output so that i will have just 324423 242332 767667 any help would be greatly appreciated Gary (5 Replies)
Discussion started by: hcclnoodles
5 Replies

4. Shell Programming and Scripting

Stripping the spaces in a string variable

Hi , i have to strip the spaces in the string which has the following value ABC DEF i want this to appear like this ABC DEF is there any spilt method? please help.... Thanks (3 Replies)
Discussion started by: rag84dec
3 Replies

5. Shell Programming and Scripting

stripping certain characters in at the middle of a string

I am trying to strip out certain characters from a string on both (left & right) sides. For example, line=see@hear|touch, i only want to echo the "hear" part. Well i have tried this approach: line=see@hear|touch templine=${line#*@} #removed "see@" echo ${templine%%\|*} #removed... (4 Replies)
Discussion started by: mcoblefias
4 Replies

6. Shell Programming and Scripting

\n not working properly

Hi all, I'm trying to generate a series of txt files starting from a plain csv file part of my code: #!/bin/ksh INSTALLDIR=/Users/ME/Installdir CSV=CSV.csv TMP=/tmp/$(basename $0).txt tr -s "\r" "\n" < /$INSTALLDIR/$CSV > $TMP function Makefiles { printf '%24s:%30s\n' "sometext"... (1 Reply)
Discussion started by: Jive Spector
1 Replies

7. Shell Programming and Scripting

stripping out digits from a string with sed

i want to parse a string and only display the digits in that string... How would i accomplish this with sed command. For example. input string: " 033434343 dafasdf" output string: 03343434 Thanks (2 Replies)
Discussion started by: timmylita
2 Replies

8. Linux

rexec not working properly

Hi, I am trying to enable rexec to automate certain tasks(it has to be rexec, not ssh or any other due to the system environment), so after switching to linux, I followed the certain instructions that were laid out in the web. My operating system is fedora 17, so I first installed the... (1 Reply)
Discussion started by: wringer
1 Replies

9. UNIX for Dummies Questions & Answers

~c is not working properly with -r option

Hi There, --------- file1 ------- ~c asd@ac.com -------------- Now i am using below command cat file1|mailx -s " testing" -r " My Name" abc@tech.com (3 Replies)
Discussion started by: Tapan Sharma
3 Replies

10. Shell Programming and Scripting

Expansion not working properly

I'm using an Ubuntu machine and expansion is not working properly. What would cause this? Do I need to check for any particular bash packages? $ ipcs -m | grep $USER | awk '{printf "%s ",$2}' $ ipcs -m | grep UNF | awk '{printf "%s ",$2}' 294912 1048577 425986 688131 786436 1245189... (14 Replies)
Discussion started by: cokedude
14 Replies
ostrip(1)						      General Commands Manual							 ostrip(1)

NAME
ostrip - Reduce the size of object files SYNOPSIS
ostrip [options] file... OPTIONS
The following options are supported by the ostrip command: Removes the section of a linked image. Removes unreferenced symbols and unused type information from the symbol tables of a pre-link file. This results in a smaller on-disk executable file. If files modified with this option are subsequently linked, ostrip -m should be run on the linked image. Joins together two files that were previously split by the -t option into a symbol table file (image.stb) and a stripped image file (image). Removes unreferenced symbols and unused type information for the symbol tables of a post-link executable file. This results in a smaller on-disk executable file. The symbol table still contains all information required for debugging. Decompresses the output of ostrip. This option is provided for cases in which the input file is compressed in ALPHAMAGICZ format. Removes the symbol table and any strippable subsections of the section. (Performs the same operations as the strip command.) Splits an image file (image) into a symbol table file (image.stb) and a stripped image file (image). The symbol table file will contain a checksum of the stripped image. Displays the version of the ostrip command. Produces a reduced symbol table by remov- ing local information. Also deletes any locally strippable subsections of the section. (Performs the same operations as the ld -x com- mand.) Compresses the output of ostrip into ALPHAMAGICZ format. DESCRIPTION
The ostrip command reduces the components of any object file based on the options that are specified. It is designed to work with any object file, that is, files, image files, and shared object files. It does not work with (archive) files. RESTRICTIONS
None. EXAMPLES
The following command strips the local symbol table and converts the object file into ALPHAMAGICZ format: ostrip -x -Z obj.o The following command produces the symbol table file osize_mm.stb and the stripped image file osize.mm: ostrip -t osize.mm The following command joins the symbol table file osize_mm.stb to osize.mm: ostrip -j osize.mm SEE ALSO
Commands: strip(1), ld(1), mcs(1), objZ(1) ostrip(1)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy