To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
Thanks. But I got a syntax error.
also, your result is slightly different from my original post. your code doesn't remove "text" after the underscore. I need to remove "_" and "text after underscore" if X*SETA exists.
Is it because my sed version is too low for your complicated code?
'X.*SETA' is not recognized as an internal or external command,
operable program or batch file.
when I run it in bash mode, I got error: sed: garbage after command
Note: I used MKS tool in window server. it's unix tool which can run on window.
You are right - I didn't see that it is needed to delete all characters behind an underscore if there is one up to the pipe.
The problem you got with your sed could be since it is a different version of sed. I am using GNU sed (gsed) which is more comfortable. Other versions of sed have problems with {} in one line - they want their contents etc. in separate lines or by using a ^J which is a bit awkward to write/read.
My concnern related to the post
-Convert shell script output txt file to html table,
in this how to print the heading as color.
awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}' <filename> (8 Replies)
I have output.txt file generated through shell scripts which need convert in tabular format using html
can you please help me
output.txt
Token State Date1 Date2 Description Name
34567 open 27/06/13 28/06/13 ... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
A) Write a script, which will take input from a file and convert the number from Centigrade to Fahrenheit... (5 Replies)
Friends,
I am trying to convert my local server timezone EST to UTC and for which I used the TZ command, see below
$ date
Thu Dec 6 10:14:14 EST 2012
$
$ TZ=UTC date -d '10:14 EST'
Thu Dec 6 15:14:00 UTC 2012
Now I would like to have the same output in 'yyyymmdd hh:mm' format.
... (4 Replies)
Hi All,
I have a output like below values
val1=test.com
val2=10.26.208.11
val3=en1
val4=test-priv1.com
val5=192.168.3.4
val6=en2
val7=test-priv2.com
val8=192.168.4.4
val9=en3
val10=test-vip.com
val11=10.26.208.9
val12=$val3
I want to convet this output values into below... (1 Reply)
Hi,
I have script which generates the output as below:
Jobname Date Time Status
abc 12/9/11 17:00 Completed
xyz 13/9/11 21:00 Running
I have the output as a text file. I need to convert it into a HTML Table and sent it thru email
... (6 Replies)
hi
Can anybody help me with converting such structure into csv file for windows :
BAT_ID ID_num CVS_LINE A_SEG SKILL_TO A_CUSTOMER_TYPE
--------- ---------- --------------------------------- ---------- ------------------ -----------
14-MAY-11 777752 ... (4 Replies)
Hi All,
I am hoping someone can help me with some scripting I need to complete using AWK.
I'm trying to process multiple fixed files to generate one concatenated fixed file in a standard format.
The Input file is:-
aaaa bbbbb ccccc 1 xxxx aaa bbb
aaaa bbbbb ccccc 2 abcd aaa CCC... (9 Replies)
Hi
I have a command which returns a timezone, Ej:
root@bsades2: /usr/local/bin # lsuser -a time_last_login israel
israel time_last_login=1279032223
Question: I want to parse this timezone '1279032223' into a 'martes, 13 de julio de 2010 16:43:43' from the ksh shell. Is itt possible?
... (3 Replies)
Hi Guys,
is there any command to convert the output returned by the below command to string format:
Code:
sed 1!d filename
Output is :
108
---------- Post updated at 11:03 AM ---------- Previous update was at 11:00 AM ----------
Because i am using this output as string parameter ... (4 Replies)