how to remove the first column of a space delimited txt file? there are 12+ columns...
what is the cleanest way? could use awk and print all but the first, but it looks kinda ugly
awk '{print $2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12"}' file.txt
whats a better way? (1 Reply)
sed 's/^..//' file1.txt > file2.txt
this will remove the first two characters of each line of a text file, what sed command will remove the last two characters? This is a similar post to my other....sry if I'm being lazy....
I need a file like this (same as last post)
>cat file1.txt
10081551... (1 Reply)
i am a bit new to shell scripting
i have a file containing
xxxx xx xx
but i want to output the content as
xxxxxxxx.
thus removing the space.
any idea how i can do this (4 Replies)
Hello
I have a file with data something like this in it :
texttexttext "text .lst" TEXT=" text "
texttexttext "moretext .lst" TEXT=" text "
Question is how do I get rid of space so that the files looks like this :
texttexttext "text.lst" TEXT="text"
texttexttext... (8 Replies)
Hi
I need help on this. Its very urgent for me.. please try to help me out..
I have data in tables in DB2 database. I would like to export the data from DB2 tables into a text file, which has to be space delimited. so that I can carry out awk, grep operations on that file. I tried to export... (2 Replies)
Hello. I have the following issue: my txt file has the following format:
train/dr4/fklc0/sx175.txt 0 80282 Severe myopia contributed to Ron's inferiority complex. train/dr4/fklc0/sx355.txt 0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
With the... (1 Reply)
Hi all,
I have a file which have say about 123,000 records, the records in it look like:
1294160401681,05-01-2011 00:00:01,68,Cjw,2,3333,7,1100,900,SUCCESS,200,68,localhost,
1294160406515,05-01-2011 00:00:06,68,Cjw,2,0207,7,1100,900,SUCCESS,200,68,localhost,
1294160410097,05-01-2011... (3 Replies)
Hi ,
I want to remove space from each record in one file My file is like
BUD, BDL
ABC, DDD, ABC
ABC, DDD, DDD, KKK
The o/p should be
BUD,BDL
ABC,DDD,ABC
ABC,DDD,DDD,KKK
Can any one help me regarding this? (9 Replies)
Hi All ,
I am facing a small challenge i need unix command to remove space as well as replace "|" to "," in a csv file .
original file :
A | B | c | D
E | F | G | H
I | J | K | L
P | M | N | O
Expected o/p:
A,B,c,D
E,F,G,H
I,J,K,L
P,M,N,O (4 Replies)
Hi,
I have a file which looks like this
FORD|1333-1| 10000100010203| 100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
I need the output to look like this
FORD|1333-1|10000100010203|100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
The leading... (8 Replies)
Discussion started by: wahi80
8 Replies
LEARN ABOUT PHP
numfmt_set_text_attribute
NUMFMT_SET_TEXT_ATTRIBUTE(3) 1 NUMFMT_SET_TEXT_ATTRIBUTE(3)NumberFormatter::setTextAttribute - Set a text attribute
Object oriented style
SYNOPSIS
public bool NumberFormatter::setTextAttribute (int $attr, string $value)
DESCRIPTION
Procedural style
bool numfmt_set_text_attribute (NumberFormatter $fmt, int $attr, string $value)
Set a text attribute associated with the formatter. An example of a text attribute is the suffix for positive numbers. If the formatter
does not understand the attribute, U_UNSUPPORTED_ERROR error is produced. Rule-based formatters only understand NumberFormat-
ter::DEFAULT_RULESET and NumberFormatter::PUBLIC_RULESETS.
PARAMETERS
o $fmt
-NumberFormatter object.
o $attr
- Attribute specifier - one of the text attribute constants.
o $value
- Text for the attribute value.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
numfmt_set_text_attribute(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo "Prefix: ".numfmt_get_text_attribute($fmt, NumberFormatter::NEGATIVE_PREFIX)."
";
echo numfmt_format($fmt, -1234567.891234567890000)."
";
numfmt_set_text_attribute($fmt, NumberFormatter::NEGATIVE_PREFIX, "MINUS");
echo "Prefix: ".numfmt_get_text_attribute($fmt, NumberFormatter::NEGATIVE_PREFIX)."
";
echo numfmt_format($fmt, -1234567.891234567890000)."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo "Prefix: ".$fmt->getTextAttribute(NumberFormatter::NEGATIVE_PREFIX)."
";
echo $fmt->format(-1234567.891234567890000)."
";
$fmt->setTextAttribute(NumberFormatter::NEGATIVE_PREFIX, "MINUS");
echo "Prefix: ".$fmt->getTextAttribute(NumberFormatter::NEGATIVE_PREFIX)."
";
echo $fmt->format(-1234567.891234567890000)."
";
?>
The above example will output:
Prefix: -
-1.234.567,891
Prefix: MINUS
MINUS1.234.567,891
SEE ALSO numfmt_get_error_code(3), numfmt_get_text_attribute(3), numfmt_set_attribute(3).
PHP Documentation Group NUMFMT_SET_TEXT_ATTRIBUTE(3)