06-30-2011
, haha so simple. I did read the man page but obviously not thoroughly enough.
Thanks for that.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to grep a long ls by looking at the beginning of each filename for example:
Many files begin with yong_ho_free_2005...
Many files begin with yong_ho_2005...
I can't just use "grep yong_ho" otherwise It'll display both files.
So I'm trying to use a regex but my syntax is wrong.
... (2 Replies)
Discussion started by: yongho
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
3. Shell Programming and Scripting
Hi All,
Very GM
I am searching for a specific filesystem on a serevr,
like df -k "/"
i am geting an output also...
but when i am checking for somthing like /oramnt (which is not mounted currently)
so i am geting an out like this
df -k "/oramnt"
output of root...!
so i tried... (7 Replies)
Discussion started by: bullz26
7 Replies
4. UNIX for Advanced & Expert Users
hello everybody,
as explained in the title, here is what I want:
str1="name1 name2 name3"
str2="name1"
str3="name"
I know that match(str1,str2) will return 1, but I want that match(str1,str3) returns 0 (when it also returns 1...)
Is there a way to get that exact matching process done... (6 Replies)
Discussion started by: farphe
6 Replies
5. Shell Programming and Scripting
I have many Gaussian output files, which contain a string start from "HF=" but follws the different values. I'm trying to get this exact string from these txt files.
example 1,
2.524075,-0.563322,-1.285286\H,0,-2.544438,-0.678834,1.199166\H,0,2.18
... (7 Replies)
Discussion started by: liuzhencc
7 Replies
6. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
7. Shell Programming and Scripting
Hi all;
Pretty green to perl programming; been searching high and low for a perl (preferably) or unix script that will compare 2 CSV strings in the same file that are separated buy the "|" character (so basically they're side by side) and give the results of ONLY the exact change; note that 19... (3 Replies)
Discussion started by: gvolpini
3 Replies
8. Shell Programming and Scripting
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies
9. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
10. Shell Programming and Scripting
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies