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. Shell Programming and Scripting
This is my command-line code in my script,
passwd=`grep $passwd $userfile | cut -f2 -d: login_users > retrieve`
the
cut -f2 -d: login_users > retrieve
searches and prints the whole column two. what I need is one of the items in the column two only.. what option can I add to my cut... (2 Replies)
Discussion started by: jenimesh19
2 Replies
4. 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
5. Shell Programming and Scripting
Hi
My input file looks like as follows: say a.txt
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss... (5 Replies)
Discussion started by: bittoo
5 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. UNIX for Dummies Questions & Answers
Hello folks,
I have to (e)grep out a certain pattern e.g. <TAG1> from a huge log file which does not have any space as such.
The thing is that once I have 'grep'ed out the <TAG1> from the file I need to extract the content within the tags, i.e,
<TAG1>Data_To_Be_Extracted</TAG1>
The underlined... (9 Replies)
Discussion started by: Rajat
9 Replies
9. Shell Programming and Scripting
I am a beginner at shell scripting, actually i am working on my first script right now.
Anyway i have searched the world how to grep two letters from each word (it will always just be two words).
For example:
Example Blablabla
I want my script to cut out Ex (from the first word) and Bl... (4 Replies)
Discussion started by: maskot
4 Replies
10. Shell Programming and Scripting
hi,
i have a simple question:
in hpux 11i;
this cmd :
cat mailtest |grep sekar >test1
gives the output file with the name test1.
i want to remove the line which contains the "sekar" and put the result in the new file....
what is the command for that?.. (2 Replies)
Discussion started by: sekar sundaram
2 Replies