10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
have a file1
aaa-bbb-ccc-abcd
aaa-bbb-ccc-bacd
aaa-bbb-ccc-aaad
aaa-bbb-ccc-ahave another file2
aaa-bbb-ccc-a fileusing the fgrep command, trying to have only the literal string returned.
fgrep -f file2 file1 is returning
aaa-bbb-ccc-abcd
aaa-bbb-ccc-aaad
aaa-bbb-ccc-aOnly looking for... (1 Reply)
Discussion started by: jimmyf
1 Replies
2. Shell Programming and Scripting
Hi,
I have FileA with one column.
File B with 15 columns separated by comma delimiter.
I need to compare the FILEA value with all 15 columns of FILEB... if matches, need to return the 1st, 2nd column values of FILEB.
How to achieve this through shell script? Thanks in advance. (5 Replies)
Discussion started by: vamsikrishna928
5 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I am a newbie here. I have this requirement to find a file based on a pattern then return the filename if found.
I created a script based on online tutorials. Though, I am stuck & really appreciate if anyone can have a quick look & point me to the right direction?
#Script starts... (10 Replies)
Discussion started by: buster_t
10 Replies
4. Shell Programming and Scripting
Hi everyone,
I have the following contents in a text file (as seen when viewed using vim):
one two three ^M
four five six ^M
seven
eight
nine ^M
ten eleven twelve ^M
(That is just a small portion of the file)
How can I obtain the following result?
one two three ^M
four five six ^M
seven... (2 Replies)
Discussion started by: gacanepa
2 Replies
5. Shell Programming and Scripting
Hi All,
I need to get the count of records in the file, if the passing parameter matches with the list of records in the file. Below is my example
source file: Test1.dat
20120913
20120913
20120912
20120912
20120912
20120912
20120912
20120913
20120913
20120912
In my script I am... (5 Replies)
Discussion started by: bbc17484
5 Replies
6. Shell Programming and Scripting
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Discussion started by: bash4ever
6 Replies
7. Shell Programming and Scripting
Hello,
i have a file "Movie.ini" looking e.g. like follows
* MOVIE A
bla bla
MOVIE B
blubb blubb
MOVIE C
I'd like to read the file "Movie.ini" with cat and grep and check whether it includes the string MOVIE only with a '*' at the beginnig.
By doing
"cat Movie.ini| grep MOVIE... (14 Replies)
Discussion started by: ABE2202
14 Replies
8. Shell Programming and Scripting
when the file is not found i want it to return to the menu, however it carries out the next line when i hit a key
I know its probably something simple can anyone help?
here is my pause function:
function pause(){
read -s -n 1 -p "Press any key to return to Menu . . ."
echo
}
SCRIPT... (2 Replies)
Discussion started by: Alendrin
2 Replies
9. Shell Programming and Scripting
Hi there,
I am writing a script to look for tmp log files that have not been access within the last 10 days.
I am using the follwing command within the script:
find /var/tmp -name *log -atime -9 ¦xargs
What I would like to be able to do would be to display a message if there is no... (3 Replies)
Discussion started by: lodey
3 Replies
10. Shell Programming and Scripting
Hi everyone , i m working on Sun solaris and i have a file "smsapp.cur" which has information like this paragraph given below , there are millions of such paragraphs
From:923212802736
To:923222326807
logMessage: 07-04-08 17:34:29 Getting message topup from code page default in language English... (2 Replies)
Discussion started by: Dastard
2 Replies