If they are space separated and you can be certain that Status will always be the penultimate one, you could use variable substitution:-
There is also the awk way to do this, but it could be expensive if you call this in a loop. The above is all within the shell process.
How will you be running this?
I hope that this helps,
Robin
~~~~~~~~~~~~~~
Bah, Don has beaten me to the punch!
Last edited by rbatte1; 09-21-2016 at 06:42 AM..
Reason: Don replied faster than I did.
I'm racking my brain on this one! :(
I have a list like this:
Paul 20
Paul 25
Paul 30
Frank 10
Julie 15
Julie 13
etc, etc...
I've been trying to figure out a way to have the output display the name in the first column ONCE and add the numbers in the second column and display that... (2 Replies)
How do I grep/check the on-hand value on the second line of show_prod script below? In this case it's a "3".
So if it's > 0, then run_this, otherwise, quit.
> ./show_prod
Product Status Onhand Price
shoe OK 3 1.1 (6 Replies)
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
I have a csv file with occasional multiple entries in the second column.
111111,104,07-24-2011,3.15,N,
222222,020 140,07-24-2011,10.00,N,I want the result
111111,104,07-24-2011,3.15,N,
222222,020,07-24-2011,10.00,N,
222222,140,07-24-2011,10.00,N,
I know I can get the output of the second... (5 Replies)
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Hi
I have 5 columns like this
a b c d e
f g h i j
k l m n o
From 2nd column till the 5th column of every record, I would like to transpose them as rows, so my output file contains only one row
a
b
c
d
e
f
g
h
i
j (9 Replies)
I have the code for the below things..
File1 has the content as below
8859 0 subscriberCreate
18 0 subscriberPaymentMethodChange
1650 0 subscriberProfileUpdate
7668 0 subscriberStatusChange
13 4020100 subscriberProfileUpdate
1 4020129 subscriberStatusChange
2 4020307 subscriberCreate
8831... (5 Replies)
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
LEARN ABOUT PHP
win32_set_service_status
WIN32_SET_SERVICE_STATUS(3) 1 WIN32_SET_SERVICE_STATUS(3)win32_set_service_status - Update the service statusSYNOPSIS
bool win32_set_service_status (int $status, [int $checkpoint])
DESCRIPTION
Informs the SCM of the current status of a running service. This call is only valid for a running service process.
PARAMETERS
o $status
- The service status code, one of WIN32_SERVICE_RUNNING, WIN32_SERVICE_STOPPED, WIN32_SERVICE_STOP_PENDING, WIN32_SER-
VICE_START_PENDING, WIN32_SERVICE_CONTINUE_PENDING, WIN32_SERVICE_PAUSE_PENDING, WIN32_SERVICE_PAUSED.
o $checkpoint
- The checkpoint value the service increments periodically to report its progress during a lengthy start, stop, pause, or continue
operation. For example, the service should increment this value as it completes each step of its initialization when it is start-
ing up. The $checkpoint is only valid when the $status is one of WIN32_SERVICE_STOP_PENDING, WIN32_SERVICE_START_PENDING,
WIN32_SERVICE_CONTINUE_PENDING or WIN32_SERVICE_PAUSE_PENDING.
RETURN VALUES
Returns TRUE on success, FALSE if there is a problem with the parameters or a Win32 Error Code on failure.
SEE ALSO win32_start_service_ctrl_dispatcher(3), Win32Service Service Status Constants.
PHP Documentation Group WIN32_SET_SERVICE_STATUS(3)