Sponsored Content
Top Forums Shell Programming and Scripting Delete spaces in between fields Post 302070052 by JunkYardWars on Friday 31st of March 2006 01:23:57 AM
Old 03-31-2006
can u provide the data..and by example what u really want.....can't get urs requirements
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete white spaces

hi all... i have the next question: i have a flat file with a lot of records (lines). Each record has 10 fields, which are separated by pipe (|). My problem is what sometimes, in the first record, there are white spaces (no values, nothing) in the beginning of the record, like this: ws ws... (2 Replies)
Discussion started by: DebianJ
2 Replies

2. Shell Programming and Scripting

align several fields and fill spaces with zero

hi all, i have a big problem, and i donīt know what to do. i have a flat file with several fields, which are separated by ";" like this: 5656838-7B;97030000-7;*;V16106133 ;1;1; 4612062-0B;97030000-7;*;C14038149 ;1;2; 8044938-0B;97030000-7;*;V16034219 ;1;2; where B is a blank space. ... (2 Replies)
Discussion started by: DebianJ
2 Replies

3. Shell Programming and Scripting

How can i remove spaces in between the fields in a file

Hey , I have a file and it's having spaces for some of the fields in it. Like the one below. I want to remove the spaces in them through out the file. The spaces occur randomly and i can't say which field is having space. So please help. Here is sample file with spaces after 5th field. (3 Replies)
Discussion started by: dsravan
3 Replies

4. UNIX for Dummies Questions & Answers

Find fields with no spaces in value

This is what I need to do I have a file that has a field with values like this 1111 2222 3333 4444 55555 666 333333333 444444444 I need for my command to out put only those fields that do not have spaces in them. So my output for the above file would be 333333333 444444444 how... (10 Replies)
Discussion started by: alfredo123
10 Replies

5. Shell Programming and Scripting

remove extra spaces between fields

Hi, I have a source file as mentioned below: I want to remove all the extra spaces between the fields. a b--------|sa df-------|3232---|3 sf sa------|afs sdf-----|43-----|33 a b c------|adfsa dsf---|23-32|23 *Here '-' idicates spaces Now, I want output as below: a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies

6. Shell Programming and Scripting

remove blank spaces from fields

Hi Friends, I have large volume of data file as shown below. Beganing or end of each filed, there are some blank spaces. How do I remove those spaces? AAA AAA1 | BBB BB1 BB2 |CC CCCC DDDD DD | EEEEEEE EEEEEEEE | FFF FFFFFF FFFF GG GGGGGG |HH HH ... (3 Replies)
Discussion started by: ppat7046
3 Replies

7. Shell Programming and Scripting

awk ignores fields with only spaces or empty

Hi, Does any one know how to avoid the scenario where awk ignores the fields having only spaces or empty fields? for instance, Data: "a","b","c","d",""," " code: awk -F, '{ print NF }' File the output I get is 4 instead of 6 do you know how to avoid this? (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies

8. Shell Programming and Scripting

How to Use Sed Command to replace white spaces with comma from between two fields - Mayank

SHELL SCRIPT Hi I have a file in the following format Mayank Sushant Dheeraj Kunal ARUN Samir How can i replace the white space in between and replace them with a comma?? The resultant output should be Mayank,Sushant Dheeraj,Kunal ARUN,Samir i tried using sed -e... (8 Replies)
Discussion started by: mayanksargoch
8 Replies

9. Shell Programming and Scripting

Cutting fields from lines with multiple spaces

Please see the following code, between "status" and "OK" exists many spaces, I want to get status OK . how to ignore multi spaces? If tab exists in the spaces, how to ignore it ? Is there other commands can replace cut? $ echo 'drv status OK'| cut... (3 Replies)
Discussion started by: 915086731
3 Replies

10. Shell Programming and Scripting

How to preserve spaces in input fields with awk?

I'm trying to do something pretty simple but its appears more complicated than expected... I've lines in a text file, separated by the comma and that I want to output to another file, without the first field. Input file: file1,item, 12345678 file2,item, 12345678 file2,item, ... (8 Replies)
Discussion started by: Armoric
8 Replies
Tcl_PkgRequire(3)					      Tcl Library Procedures						 Tcl_PkgRequire(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgRequireProc, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx - package version control SYNOPSIS
#include <tcl.h> const char * Tcl_PkgRequire(interp, name, version, exact) const char * Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr) int Tcl_PkgRequireProc(interp, name, objc, objv, clientDataPtr) const char * Tcl_PkgPresent(interp, name, version, exact) const char * Tcl_PkgPresentEx(interp, name, version, exact, clientDataPtr) int Tcl_PkgProvide(interp, name, version) int Tcl_PkgProvideEx(interp, name, version, clientData) ARGUMENTS
Tcl_Interp *interp (in) Interpreter where package is needed or available. const char *name (in) Name of package. const char *version (in) A version string consisting of one or more decimal numbers separated by dots. int exact (in) Non-zero means that only the particular version specified by version is acceptable. Zero means that newer versions than version are also acceptable as long as they have the same major version number as version. ClientData clientData (in) Arbitrary value to be associated with the package. ClientData *clientDataPtr (out) Pointer to place to store the value associated with the matching package. It is only changed if the pointer is not NULL and the function completed successfully. int objc (in) Number of requirements. Tcl_Obj* objv[] (in) Array of requirements. _________________________________________________________________ DESCRIPTION
These procedures provide C-level interfaces to Tcl's package and version management facilities. Tcl_PkgRequire is equivalent to the package require command, Tcl_PkgPresent is equivalent to the package present command, and Tcl_PkgPro- vide is equivalent to the package provide command. See the documentation for the Tcl commands for details on what these procedures do. If Tcl_PkgPresent or Tcl_PkgRequire complete successfully they return a pointer to the version string for the version of the package that is provided in the interpreter (which may be different than version); if an error occurs they return NULL and leave an error message in the interpreter's result. Tcl_PkgProvide returns TCL_OK if it completes successfully; if an error occurs it returns TCL_ERROR and leaves an error message in the interpreter's result. Tcl_PkgProvideEx, Tcl_PkgPresentEx and Tcl_PkgRequireEx allow the setting and retrieving of the client data associated with the package. In all other respects they are equivalent to the matching functions. Tcl_PkgRequireProc is the form of package require handling multiple requirements. The other forms are present for backward compatibility and translate their invocations to this form. KEYWORDS
package, present, provide, require, version Tcl 7.5 Tcl_PkgRequire(3)
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy