How can I fina line if filed 1 eq a P
if I do a grep "P" I will get 3 I only want to get the 2 that start with a P
ie:
"P","123","abc345","678" < Get this one
"S","194","abc345","678" < don't get this one
"S","123","abc345","P" < don't get this one
"P","789","abc345","678" < Get...
How can I turn off FancyIndexing I don't want my directories browseable. There must be a .htm file or nothing should show.
Thanks
Brandt
I am on apache on SCO 5.07
How can I turn off FancyIndexing I don't want my directories browseable. There must be a .htm file or nothing should show.
Thanks
Brandt
I am on apache on SCO 5.07
OK
field 5 & 13 take leading 0's out
thanks
"P","A","","","000000000501083","0","aaaaaaa","bbbbbbbb","cccccccccc","A","","","000000000546758","0","bbbbbbb","cccccccc"
"P","A","","","000000000546758","0","bbbbbbb","cccccccc","cccccccccc","A","","","000000000546758","0","bbbbbbb","cccccccc"...
I can't seem to get the syntax correct.
I tried
awk 'BEGIN{FS=OFS=","}{sub(/"0*/,"\"",$5);sub(/"0*/,"\"",$16);print}' foo > foo.
out
field 5 works fine fild 16 does not.
Thanks
Brandt
OK Thanks
I forgot to add that the field is NOT the first one.
It would be the 5th field
Thanks
Brandt
ie:
"P","A","","","000000000501083","0","aaaaaaa","bbbbbbbb","cccccccccc"
"P","A","","","000000000546758","0","bbbbbbb","cccccccc","cccccccccc"...
I have a file with several fields. There is a field that has leading zeros, how can I get rid of them?
I am only showing 1 field below in sample.
Thanks in advance,
Brandt
ie:
"000000000501083"
"000000000546459"
"000000000006758"
"000000000314515"
"000000000332358"
"000000000082485"...
vgersh99
When I try your line I get the Literal:
"AIL","A","","","","000000000156425","","","3","1","","N","N","","","","","","",
"","20041114","20041126","","","","","","","","","","","","","Y","","$(date +%Y%m%d)"
Thanks
Brandt
I have a standard ascii comma, quoted file. I need to add todays date to the end of the record.
This will run in a script and run daily... So the date will be a variable.
ie:
"aaaaaaa","bbbbb","cccccc","ddddd" < Now
"aaaaaaa","bbbbb","cccccc","ddddd","20041207" < Needs
Thanks
Brandt
I have ascii reports that are generated from our telephone system. At a specified time the reports are sent out a RS232 serial port. I need to have my com1 port on my SCO box receive te data and save it to a file.
How can I open the com1 port? Does anyone have a script. I would prefer not to...
PHV
See the middle record.
This is the result of you script.
Thanks
Brandt
1,557802,2,0,"","",20041014,20041014,"","",0,0,0,20041014,20041014,0,0,"",0,"",
"","","","150494",0,1,4015,1,"",0,0,"Y","","","","1U",0
^M...
OK,
This browser will not allow "-" as the first chr (Don't know why) My example below I am using a "=" instead of "-"
The 1st field could be
1 chr 6
2 chr 62
3 chr 620
I need to replace the 1st field with a "-1" (no quotes) The main issue is I MUST keep the record length to 304 char...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.