10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a binary data that has some text in it.
what i want to do is, i want to grab just piece of information from the binary. but when i run my awk on it, it returns nothing.
awk -F"MYINFO=" '{print $2}' mybinary
however, when i install gawk, then try again, it works.
i would prefer... (1 Reply)
Discussion started by: SkySmart
1 Replies
2. Shell Programming and Scripting
i have data that can look like this:
echo "Master_Item_Service_is_down=0_njava_lang_NoClassDefFoundError=0_njava_lang_OutOfMemoryError=1_nemxCommonAppInitialization__Error_while_initializing=0_nINFO__Stopping_Coyote_HTTP_1_1_on_http_8080=7_nThe_file_or_directory_is_corrupted_and_unreadable=0_n" ... (7 Replies)
Discussion started by: SkySmart
7 Replies
3. Shell Programming and Scripting
data.txt:
hellohellohello
mellomello1mello
tellotellotellotello
bellobellowbellow
vellow
My attempts:
egrep ".*mello1\n.*bellow" data.txt
awk '/.*mello1.*\nbellow/' data.txt
how can i search for patterns that are on different lines using simple egrep or awk?
i only want the... (7 Replies)
Discussion started by: SkySmart
7 Replies
4. Shell Programming and Scripting
Morning Guys,
I am attempting to awk a file which strings in the file is only 6 characters long and not more.
Currently it is counting every line and giving a count of 59, but it should be 57 (not including the long baracode - 004705CIM*****)
" awk '/./ {cnt++} END {print cnt}'... (11 Replies)
Discussion started by: Junes
11 Replies
5. Shell Programming and Scripting
Hi there,
my ksh script collects a procstack trace for a particular pid and then greps it by a transaction id to find out the pthread ID:
---------- tid# 1876087 (pthread ID: 4466) ----------
So the pthread ID I want is 4466 in this case, and it is assighed to the variable $pthread.... (4 Replies)
Discussion started by: tmf33uk
4 Replies
6. Shell Programming and Scripting
The input file has 3 columns. the first column with low values second with bigger.If the symbol is - in third column the numbers have to change the least in column1 and highest in col2.
Input
col1 col2 col3
1 2 +
2 3 -
3 4 +
5 6 -
Output
col1 col2 col3
1 2 +
3 2 -
3 4 +
6 5 -
The... (2 Replies)
Discussion started by: stateperl
2 Replies
7. Shell Programming and Scripting
Hey ppl
I have two columns with random values. i need to insert the 1st row of the first column with the highest number of the two rows in the first column and vice versa. some thing like this. I'm sorry If my question is unclear...:rolleyes:
input
col1 col2
12...11
11...14
34...45... (11 Replies)
Discussion started by: sophiesophie
11 Replies
8. Shell Programming and Scripting
Hi...
How does awk or sed or even grep extract the following string out of my text file?.
'"${ETL_VW_SCHEMA}"'.IATA_STN_TZ_UTC_LCL_CONV_CV
'"${ETL_VW_SCHEMA}"'.CO
'"${ETL_VW_SCHEMA}"'.TEST_CO
I just need to extract the second entry which means I need to let awk know I am just searching for... (5 Replies)
Discussion started by: anduzzi
5 Replies
9. Shell Programming and Scripting
OKAY----
Here's what I must do.
I have two files. I need to compare the two files such as with the diff command. I am adding FILENEW to FILEOLD
If fields $1, $2, $5, and 6 are the same, then I don't want to add FILENEW records to FILEOLD.
If they are not, then append the lines.
Is... (11 Replies)
Discussion started by: jeffpas
11 Replies
10. Shell Programming and Scripting
Hi friends,
I have a small problem with AWK. I am not able to print decimal values! :confused: below is my code:
#! /bin/awk -f
awk BEGIN{printf("%d",123)}; -> This prints the integer properly.
x=111
awk BEGIN{printf("%d",x)}; -> This doesnt print! :(
Please help me solve this. It... (4 Replies)
Discussion started by: divzz
4 Replies