10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have this filename "RBD_EXTRACT_a3468_d20131118.tar.gz" and I would like print out the "yyyymmdd" only. I use this command below, but if different command like cut or print....etc. Thanks
ls RBD_EXTRACT* | sed 's/.*\(........\).tar.gz$/\1/' > test.txt (9 Replies)
Discussion started by: dotran
9 Replies
2. Shell Programming and Scripting
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
3. Slackware
not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell.
but how must the command be?
grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d
the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies
4. UNIX for Dummies Questions & Answers
I have a data file that looks like this:
infile:
A
13
Z
23
F
22
Z
413
R
16how do I combine the -A option with the -v option to get the lines that don't match 'Z' and their next lines?
the outfile should be:
A
13
F
22
R
16I tried: (1 Reply)
Discussion started by: jdhahbi
1 Replies
5. Shell Programming and Scripting
Hi
I am wondering is it possible to combine two greps together
I have two greps.
grep "^,, *\." file
(grep the line which has a '.' in the third column)
grep "=" file
(grep the line which has = anywhere)
How to put them together so that if the content of the file that match either... (1 Reply)
Discussion started by: tiger66
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
From the file "example" with lines like below, I need the int value associated with ENG , i.e, 123
SUB: ENG123, GROUP 1
SUB: HIS124, GROUP 1
..
..
Normally , i do
grep ENG example | cut -d ' ' -f 2 | cut -c 4-6
Is it possible to do it in simpler way using awk/sed ?
... (5 Replies)
Discussion started by: priyam
5 Replies
7. Shell Programming and Scripting
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Discussion started by: abbzer0
5 Replies
8. Shell Programming and Scripting
<CRMSUB:MSIN=0100025144,BSNBC=TELEPHON-9814072360-TS11&TS21&TS22,NDC=9814
<ENTROPRSERV:MSIN=0100025144,OPRSERV=UCSI,UCSI=771-919814047117&775-919814047117;
<ENTRGCSERV:MSIN=0100025144,GCSERV=CALLWAIT-PROV&CALLHOLD&CLIP&HOTBILL&NATSS05,CLIPOVR=NO;... (3 Replies)
Discussion started by: dodasajan
3 Replies
9. Shell Programming and Scripting
Hi
Is there a way to cut the last two characters off a word or number given that this word or number can be of varying length?
I have tried something like
TEST=`echo $OLD | cut -c 1-5`
where $OLD is a variable containing a number like 1234567 which gives a result of 12345. This is fine... (4 Replies)
Discussion started by: rleebife
4 Replies
10. UNIX for Dummies Questions & Answers
how do i search for the phrase "expected" on line one and
"received" on line two. (there is a newline in between the two)
I would like to know if/how this can be done in perl and/or
grep and/or sed (3 Replies)
Discussion started by: artjaniger
3 Replies