10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to write a script that takes a file name in the form of Name_Num1_Num2.Extension and I want to separate the name portion and then use grep to see if that name part has any illegal characters in it.
I already have my grep command written and it works, I'm not sure how to separate the... (5 Replies)
Discussion started by: steezuschrist96
5 Replies
2. UNIX for Dummies Questions & Answers
Hi ladies and gentleman.. I have two text file with me. I need to replace one of the file content to another file if one both files have a matching pattern.
Example:
text1.txt:
ABCD 1234567,HELLO_WORLDA,HELLO_WORLDB
DCBA 3456789,HELLO_WORLDE,HELLO_WORLDF
text2.txt:
XXXX,ABCD... (25 Replies)
Discussion started by: bananamen
25 Replies
3. Shell Programming and Scripting
Need to sort a portion of a file in a Alphabetical Order.
Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted.
Currently All_users.txt contains the following lines.
##############
# ARS USERS
##############
mike, Mike... (6 Replies)
Discussion started by: evrurs
6 Replies
4. UNIX for Advanced & Expert Users
Hi ,
I am getting file name like
ABC_DATA_CUSTIOMERS_20120617.dat
ABC_DATA_PRODUCTS_20120617.dat
Need to convert
CUSTIOMERS.dat
PRODUCTS.dat
Help me how to do this. (7 Replies)
Discussion started by: reach_malu
7 Replies
5. Shell Programming and Scripting
Mysql log has something like:
I want to grep only the portion "ernie-1328697839.1233158" from each line. How to do this? (6 Replies)
Discussion started by: proactiveaditya
6 Replies
6. UNIX for Dummies Questions & Answers
Alright, here's the deal. I'm running the following ruby script (output follows):
>> /Users/name/bin/acweather.rb -z 54321 -o /Users/name/bin -c
Clouds AND Sun 57/33 - Mostly sunny and cool
I want to just grab the "57/33" portion, but that's it. I don't want any other portion of the line. I... (5 Replies)
Discussion started by: compulsiveguile
5 Replies
7. UNIX for Advanced & Expert Users
I want to grep a portion of the log file. grepping a particular pattern and including 10 lines before that and after that occurence.
grep -n "SomeString Pattern" filename
10 lines before this occurence and 10 lines after that.
Please help. Need the simple script not in awk or sed. (9 Replies)
Discussion started by: sainipardeep
9 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a little problem. I am having a file with pattern like :
asdf;ffgg;dfjfj;djdfjf;nnjj;djd;ssj;
I just want to print the portion from last ";" upto the immediate previous ";". There are several ";" in my line.
Please help me out...
Thnx in advance (8 Replies)
Discussion started by: vanand420
8 Replies
9. Programming
hi i would like to know whether i can delete a part of a file in C
for eg. if my file contained
1234567890
and i want to delete
456
so that it becomes
1237890
is there a way i can do this.
well, one way i can achieve this is by creating a new file, copy whatever i want, then delete the... (2 Replies)
Discussion started by: sameersbn
2 Replies
10. Shell Programming and Scripting
Can anyone tell me how to remove a portion of a large file to smaller ones? What I have is a large file that was created becasue several similar files were joined together. Each individual file starts with MSG_HEAD. I want to take everything from MSG_HEAD up to were it says MSG_HEAD again and... (13 Replies)
Discussion started by: methos
13 Replies