Sponsored Content
Top Forums Shell Programming and Scripting Help with removal of spaces between operators and operands Post 302528378 by abk07 on Tuesday 7th of June 2011 04:33:49 AM
Old 06-07-2011
Bug Help with removal of spaces between operators and operands

Hi I'm trying to remove blank spaces in expressions and function calls..
Consider the following example


Code:
printf ("Hello");
a = a + b;

I'm trying to eliminate space in between the function name and the opening brace. And also eliminate space between operators and operands..
That is, I'm trying to get the following output

Code:
printf("Hello");
a=a+b;

How can I do that??
Thanks in advance..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Arithmetic Operators

Hello, I have a list of 'inputs' and i want to convert those on the second list named 'Desired Outputs', but i don't know how to do it? Inputs Desired Outputs 1 2 94 4 276 8 369 10 464 12 ... (0 Replies)
Discussion started by: filda
0 Replies

2. UNIX for Dummies Questions & Answers

Operators

I am trying to understand Does the following: {tmp+=$10} Mean take $10 and add them all up and call it tmp thanks! (2 Replies)
Discussion started by: llsmr777
2 Replies

3. UNIX for Dummies Questions & Answers

selective removal of blank spaces in string

Hi, I'm a newbie to shell scripting and I have the following problem: I need all spaces between two letters or a letter and a number exchanged for an underscore, but all spaces between a letter and other characters need to remain. Searching forums didn't help... One example for clarity: ... (3 Replies)
Discussion started by: Cpt_Cell
3 Replies

4. Shell Programming and Scripting

Operators

I really don't know the meaning of these operators. Could someone explain the meanings so I can make my test for today? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

5. Homework & Coursework Questions

Operators

I really don't know the meaning of these operators. Could someone explain the meanings? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

6. Shell Programming and Scripting

Help with removal of blank spaces in a file

Hello.. I have a text file. I want to remove all the blank spaces(except tab) from the file.. I tried using sed command as shown below sed 's/ //g' file1 But the problem with the above command is that it also eliminates 'tab' which is between the columns.. For example if the contents... (7 Replies)
Discussion started by: abk07
7 Replies

7. Shell Programming and Scripting

Help with removal of blank spaces from the second field!

Hi everyone.. I'm trying to eliminate multiple whitespaces from a file.. I must make use of shell script to eliminate whitespaces.. Take a look at the sample file 1 int main() 2 { 3 int a,b; 4 printf("Enter the values of a and b"); 5 scanf("%d%d",&a,&b); 6 if(a>b) ... (6 Replies)
Discussion started by: abk07
6 Replies

8. Shell Programming and Scripting

Array operators

Hi Lets say I have two arrays: VAR_1 = "File_A" "File_B" "File_C" "File_D" VAR_2 = "File_A" "File_D" Is there a simple command to get the difference of these list, i.e. VAR_1_2 = "File_B" "File_C" or do I have to write a script and loop through all elements and compare them one by one? ... (1 Reply)
Discussion started by: Wernfried
1 Replies

9. Shell Programming and Scripting

Removal of extra spaces in *.log files to allow extraction of frequencies

Our university has upgraded its version of a computational chemistry program that our group uses quite regularly. In the past we have been able to extract frequency spectra from log files that are generated. Since the upgrade, the viewing program errors out. I've been able to trace down the changes... (16 Replies)
Discussion started by: wsuchem
16 Replies
Locale::Codes::LangFam(3)				User Contributed Perl Documentation				 Locale::Codes::LangFam(3)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::LangFam(3)
All times are GMT -4. The time now is 05:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy