Search Results

Search: Posts Made By: Joselouis
1,949
Posted By Joselouis
Remove leading zeros separated by pipe
I have a below file and I wanted to remove the leading zeros in each field separated by pipe

File:

01/09/2017|2017/09/06|2017/02/06|02/06/2017|02/06/2017 06:50:06...
839
Posted By Joselouis
Thanks RudiC..
Thanks RudiC..
839
Posted By Joselouis
Fetch field to variable
Input.txt

NOTE1|VALUE1|HMM|UPSTR|
NOTE2||HMP|UPSTR|
NOTE3|VALUE3|HML|UPSTR|
NOTE4||HMD|UPSTR|
NOTE5|VALUE5|HMS|UPSTR|
NOTE6|VALUE6|HSD|UPSTR|
NOTE7||HSS|UPSTR|
NOTE8|VALUE8|HEE|UPSTR|...
1,460
Posted By Joselouis
HI itkamaraj, thanks for the reply, the below...
HI itkamaraj, thanks for the reply, the below command just displaying the whole file without any change.

awk -F"|" '$1~/$line/{sub(V1,$3)}1;{sub(V2,$5)' V1="${VAR1}" V2="${VAR2}" Mofidy.txt

...
1,460
Posted By Joselouis
VAR1=$(autorep -j $line | awk "/$line/ {print $2...
VAR1=$(autorep -j $line | awk "/$line/ {print $2 $3}")
VAR2=$(autorep -j $line | awk "/$line/ {print $4}")

In above am trying to gwt job time, if job time is changed am trying to edit the...
1,460
Posted By Joselouis
Search pattern then find and replace
If condition satisfy, want to find pattern and modify two Fields in Modify.txt

Input.txt

SOURCE1
SOURCE2
SOURCE3
SOURCE4
SOURCE5
SOURCE6

Modify.txt

SOURCE1|SLA|2016/12/11 11:12:11...
1,538
Posted By Joselouis
Thanks a lot for all your input, everything...
Thanks a lot for all your input, everything really helped

And also I got another autosys way to do it


autostatus -j JOBNAME


Above command gave me the status.. thank you all
1,538
Posted By Joselouis
To get the job status from second line
I want to get the job status from the second line "SU" to a variable

Input:

Job Name Last Start Last End ST Run/Ntry Pri/Xit
JOBNAME 10/24/2016 10:34:55 ...
1,440
Posted By Joselouis
Thank you R.Singh.. code has worked :)
Thank you R.Singh.. code has worked :)
1,440
Posted By Joselouis
Hi Don/MadeinGermany, I have already tried these,...
Hi Don/MadeinGermany, I have already tried these, but they are giving me the below error.

sed -i "1s/$/$VAR/" Input_file
sed -i "1s/$/"$VAR"/" Input_file
sed -i '1s/$/"$VAR"/' Input_file
sed...
1,440
Posted By Joselouis
In the below input file, end of the first line I...
In the below input file, end of the first line I want to add the below variable value

VAR="12-11-16|11 2016 Jan 12:34:55|03:55|"

Input_file:
12-11-16|11 2016 Jan 12:34:55|03:55|
13-10-16|10...
1,440
Posted By Joselouis
Hi Singh, Thanks for your reply, sorry it...
Hi Singh,

Thanks for your reply, sorry it didn't work out, it again failed because of the special characters in it.
1,440
Posted By Joselouis
Need to add a numeric & special char to end of the first line
Need to add a numeric & special char to end of the first line

Existing file:

12-11-16|11 2016 Jan 12:34:55|03:55|
13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55|...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 06:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy