Sponsored Content
Full Discussion: Handling blank spaces
Top Forums Shell Programming and Scripting Handling blank spaces Post 302340984 by edidataguy on Tuesday 4th of August 2009 11:07:11 PM
Old 08-05-2009
You input and your output dont match.
Example: There is no "Kim" in input while it is present in output.

Code:
 
sed 's/^\([[:digit:]]\{1,\}\),\([[:alpha:]][[:alpha:], ]*\),\([[:digit:]]\{5\}\),\([[:alnum:]]\{1,2\}\),\(.*\)$/\1,\"\2\",\3,"\5"/' comaquotes.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

handling spaces in unix

I am testing a ksh script for email. In the script I receive several parameters. One of them is a subject. The subject may contain spaces. Ex. Test this. When I am running the script on telnet to test, how should the syntax at the command line be written. I have this: ksh ResendE.sh '001111'... (2 Replies)
Discussion started by: supercbw
2 Replies

2. Shell Programming and Scripting

blank spaces getting deleted

I have to filter out data from a file based on the value of first three characters of each record I have used the following logic FIN=$LOC/TEST2.TXT FEEDFILE=$LOC/TEST1.TXT while read FDROW do FEEDROW=$FDROW; DTYPE=`echo $FEEDROW |cut -c 1-3` if ; then echo $FEEDROW >> $FIN... (5 Replies)
Discussion started by: gander_ss
5 Replies

3. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

4. UNIX for Dummies Questions & Answers

handling white spaces with getopt

Hi I'm trying to ensure that I have catered for all situations with my getopt cases. One other situation I want to cover is should the user enter the script without any preceding arguments eg: ./script_eg I need the script to the direct the user to the helpfile I have tried... (3 Replies)
Discussion started by: ladyAnne
3 Replies

5. Shell Programming and Scripting

Problems with Blank Spaces

Hi to all. How can I pass to the stat command a file path with blank spaces? And another question, if I use stat command like this: stat / -name "*.sh" -user $user_name -exec stat -c %n%x {} \; How can I get the result with a ":" into the name of the file and the time of the last... (4 Replies)
Discussion started by: daniel.gbaena
4 Replies

6. Shell Programming and Scripting

Handling directory with spaces in for loops

Hi everyone, I have been a big fan here since a couple years (since I started being an admin ...) and finally decided to become a member and help ppl and perhaps being helped Now I have a problem that might interest some of the gurus. I am abig fan of what I call "one liners". I am trying... (2 Replies)
Discussion started by: plmachiavel
2 Replies

7. Shell Programming and Scripting

Remove blank spaces

Gents, Please can you help me.. to remove blank spaces :) Input ABSOLUTE , ,FALSE ,1035 ,28 ,669 ,1817.0 ,CORREL BEFORE ,1 ABSOLUTE , ,FALSE ,1035 ,28 ,686 ,1817.0 ,CORREL BEFORE ,1 ABSOLUTE , ,FALSE ,1035 ,28 ,670 ,1819.0 ,CORREL BEFORE ,1 ABSOLUTE , ,FALSE ... (4 Replies)
Discussion started by: jiam912
4 Replies

8. UNIX for Advanced & Expert Users

File Processing: Handling spaces in a line

Hi All, Iam trying to get a file processed and some lines have spaces...the below is not working Want to remove empty line Want to remove lines that start with # Avoid line with substring WHOA When trying to get the substring from the var also Iam having trouble file is like VAR=VALUE,... (13 Replies)
Discussion started by: baanprog
13 Replies

9. UNIX for Advanced & Expert Users

Delete blank spaces and blank lines in a file

Hi Gurus, Somebody can say me how to delete blank spaces and blank lines in a file unix, please. Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies

10. Shell Programming and Scripting

Handling filenames with spaces

I'm trying to handle some files with spaces in their name using "" or \ . Like "file 1" or file\ 1. My current confusion can be expressed by the following shell script: #!/bin/bash touch "file 1" "file 2" echo -n "ls: " ; ls echo --- for file in "file 1" "file 2" ; do echo $file... (9 Replies)
Discussion started by: Ralph
9 Replies
ximtoppm(1)						      General Commands Manual						       ximtoppm(1)

NAME
ximtoppm - convert an Xim file into a portable pixmap SYNOPSIS
ximtoppm [--alphaout={alpha-filename,-}] [ximfile] DESCRIPTION
Reads an Xim file as input. Produces a portable pixmap as output. The Xim toolkit is included in the contrib tree of the X.V11R4 release. OPTIONS
--alphaout=alpha-filename ximtoppm creates a PGM (portable graymap) file containing the alpha channel values in the input image. If the input image doesn't contain an alpha channel, the alpha-filename file contains all zero (transparent) alpha values. If you don't specify --alphaout, ximtoppm does not generate an alpha file, and if the input image has an alpha channel, ximtoppm simply discards it. If you specify - as the filename, ximtoppm writes the alpha output to Standard Output and discards the image. Actually, an Xim image can contain an arbitrary fourth channel -- it need not be an Alpha channel. ximtoppm extracts any fourth channel it finds as described above; it doesn't matter if it is an alpha channel or not. See pnmcomp(1) for one way to use the alpha output file. All options can be abbreviated to their shortest unique prefix. SEE ALSO
pnmcomp(1), ppm(5) AUTHOR
Copyright (C) 1991 by Jef Poskanzer. April 2, 2000 ximtoppm(1)
All times are GMT -4. The time now is 07:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy