Search Results

Search: Posts Made By: sameucho
1,459
Posted By sameucho
I mean the output should be "the line I need to...
I mean the output should be "the line I need to get". The example wasn't originaly quoted correctly (meantime I have corrected it). But if I understand your proposal well, only one more ';n' should...
1,459
Posted By sameucho
How to get line after occurence of sequence of patterns
In the past I needed a help with the problem how to search for pattern after the occurence of another pattern which is described in this thread:
...
6,311
Posted By sameucho
Hi Alister,
it is a binary file. The Hexdump output of the file is the following:


00000000 10 00 00 00 5a 01 00 00 00 00 a8 61 00 00 00 00 |....Z......a....|
00000010 00 02 fc 00 dd 01 01 00 01 00 d7...
6,311
Posted By sameucho
how to get data from hex file using SED or AWK based on pattern sign
I have a binary (hex) file I need to parse to get some data which are encoded this way:

.* b4 . . . 01 12 .* af .* 83 L1 x1 x2 xL 84 L2 y1 y2 yL

By another words there is a stream of...
2,267
Posted By sameucho
OK, I needed something like this
sed -n '/<SECTION NAME=.MAP.>/,/<\/SECTION>/p' config_file.txt | sed -n '/<PARAMETER NAME=.ForcedLocalTDP14ForGPRSCSI./,/RESPONSIBILITY/p' > TDP14.cfg;
test `grep -i 'VALUE=.true.' TDP14.cfg |...
2,267
Posted By sameucho
No, this is not what I need. I know of course to...
No, this is not what I need. I know of course to grep file and check the presence of specific string. But in the config file there are many parameters which have type/value/range/visibility defined....
2,267
Posted By sameucho
check file for presence of set of strings
hi everybody,

I need a quick help with this issue. I have configuration file in which the following set of strings must be present. I need to check it with the bash script (leading spaces are not...
4,001
Posted By sameucho
What is a 'ruby' command? I am using bash and I...
What is a 'ruby' command? I am using bash and I get msg:
-bash: ruby: command not found

---------- Post updated at 11:50 AM ---------- Previous update was at 11:45 AM ----------

Hi everybody,...
4,001
Posted By sameucho
Hi ygemici,
thanx for your posts, but your solution with grep is not universal as limited by -A option.

sed is fine, but proposed awk script is more comprehensible in this case.
4,001
Posted By sameucho
Thank you for your help and explanation.
This slight modification of your script fulfil my needs:

awk 'x&&/pattern2/{print NR,$0;exit}/pattern1/{x=1}' file

But after all to learn more, is there any solution with -m option using grep?
4,001
Posted By sameucho
Sorry, I don't understand. Can you explain a...
Sorry, I don't understand. Can you explain a little your script please?
But I am afraid if it works .... in the given example the strings aaa, bbb, ccc ... must be considered only as dummy...
4,001
Posted By sameucho
Search file for pattern2 starting from occurence of pattern1
Hi folks,

I have a file which contains several occurences of 2 different patterns. I need to find out the line of first occurence of pattern2 starting after the position of first occurence of...
1,595
Posted By sameucho
Manipulating a file
Hi everybody,

I need an urgent help with a BASH script. I have file which contains (besides the other data) the lines with the following structure identified by with keyword PCList:


...
2,069
Posted By sameucho
Tahank you once more. I see I will have to find...
Tahank you once more. I see I will have to find some time to learn AWK.
2,069
Posted By sameucho
Thank you.
Both solution works - thanks a lot - but both I don't fully understand it :confused: Would you give please some short explanation too?

What's about the second one, I don't even know how to adapt...
2,069
Posted By sameucho
How to parse data?
Hi all,

I have output of paction command looking like this:

RELCI 0 IP address 1.2.16.3
[SIG ] Xmit: CURRENT Recv: WAIT_HEADER 0 congestions 2617/0 buf. sent/rec
...
13,958
Posted By sameucho
Thanks. But if I understand it well, this script...
Thanks. But if I understand it well, this script is not self-terminating. It only gives you the notification. Isn't it?

---------- Post updated at 06:13 PM ---------- Previous update was at 05:59...
13,958
Posted By sameucho
Yes, this work! Thanks a lot. ------ ...
Yes, this work! Thanks a lot.

------

Bsnithin, what's about your solution about filesize comparision? I am still interesting to know it.

---------- Post updated at 05:46 PM ----------...
13,958
Posted By sameucho
I try something like this: ...
I try something like this:

NewTimestamp=$OldTimestamp;
while [$NewTimestamp -eq $OldTimestamp ]; do
sleep1;
NewTimestamp=$(date -r $CsvDir/$CsvFile);
echo old: $OldTimestamp;...
13,958
Posted By sameucho
Script to wait until file is updated
Hello,

I need to evaluate (under BASH) if the certain file has been updated or not. If the file still wasn't updated, script should wait. The script picks up the time stamp of the file using...
21,277
Posted By sameucho
Yes, you are right. My conclusion was prematured...
Yes, you are right. My conclusion was prematured (I judged before I even tried it).
Thanks
21,277
Posted By sameucho
Simple! - for those who know :cool: Thank you...
Simple! - for those who know :cool:
Thank you very much!
21,277
Posted By sameucho
I tried this, but script produce output file...
I tried this, but script produce output file which contains leading spaces (it aligns lines from source file to right). My need is to add spaces to end of each line (from source file).

----------...
21,277
Posted By sameucho
How to add trailing spaces to have file with lines of the same length?
I have textfile (source.txt) with different length of lines in it. Can anybody help to compose a script under bash which would add suitable number of trailing spaces to the end of each line so that...
Showing results 1 to 24 of 24

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