10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is the command output need to be matched:
Telnet console listening to port 42365.
(the port number changes every time)
Code to test it:
set timeout 10
set bashId $spawn_id
... (4 Replies)
Discussion started by: marsala
2. Shell Programming and Scripting
we want to fetch the latest file in a given directory and also the file name should match the below pattern
Example file name ->hrdata-2015-10-13-16-45-26.xml(2015-10-13-16-45-26- it is not current timestamp, we just need to check for the pattern)
We expect the file will have the... (3 Replies)
Discussion started by: vishwanath001
3. UNIX for Dummies Questions & Answers
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
4. Shell Programming and Scripting
The sample file:
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
5. Shell Programming and Scripting
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
6. Shell Programming and Scripting
I have the following code. I want to remove the --sort=num/num/... and am
using grep to exclude it as shown below:
I have a bit of problem figuring out the use of - at the front
echo "--sort=4/5/6" | grep -ivE '-((sort|group)=+/+(/+)*)$'
Now suppose I want to remove --quiet
I can... (7 Replies)
Discussion started by: kristinu
Hi! I need to get PID of some particular process and I wonder if I can use pgrep tool for this purpose. The problem is that pgrep doesn't perform pattern matching on the whole command line, even if I use -f key. Parsing output of ps command is not quite convenient... Also deamon, which PID I need... (2 Replies)
Discussion started by: Sapfeer
8. Shell Programming and Scripting
I wish to use a column, as inputted by a user from command line, for pattern matching.
if($1 ~ /^8/)
print $0> "temp2.csv"
something like this, but i want '$1' to be any column as selected by the user from command line.
... (1 Reply)
Discussion started by: invinclible0009
9. Shell Programming and Scripting
I'm looking for some help. I have a file (very long) that is organized like below:
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Discussion started by: d.chauliac
10. Shell Programming and Scripting
I have file 1.txt with following entries as shown:
In file 2.txt I have the following entries as shown:
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas