10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies
2. UNIX for Beginners Questions & Answers
I think what I'm trying to do is pretty straightforward but I just can't find a way to do it.
I'm trying to run a double pattern match in a three column file. If the first two columns match, I need to output the third.
So in the file
AAA BBB 1
BBC CCC 5
CCC DDD 7
DDD EEE 12
If the... (4 Replies)
Discussion started by: matthewndavies1
4 Replies
3. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
4. Shell Programming and Scripting
I have the following code. I want to remove the --sort=num/num/... and am
using grep to exclude it as shown below:
I have a bit of problem figuring out the use of - at the front
echo "--sort=4/5/6" | grep -ivE '-((sort|group)=+/+(/+)*)$'
Now suppose I want to remove --quiet
I can... (7 Replies)
Discussion started by: kristinu
7 Replies
5. AIX
Hi all,
I have two instance of jboss (jboss and jboss2). In a shell script that I am writing, I need to grep for each instance of jboss.
If i use ps -ef|grep 'jboss', it will also return the process for my second instance of jboss, which is jboss2. Can someone tell me how can i specify the... (1 Reply)
Discussion started by: haroon_a
1 Replies
6. Shell Programming and Scripting
Hi,
I have field in a file which would come with any special character, how do i check that field?
Eg: @123TYtaasa>>>/ 131dfetr_~2
In the above example, how do I add pattern for any special character on the keyboard.
Thanks (3 Replies)
Discussion started by: techmoris
3 Replies
7. Shell Programming and Scripting
Hi,
I am trying to replace a specific column values in a csv file with double quotes.
Example:
SNO,NAME,ZIPCODE,RANK,CARE_OF
1,Robert,74538,12,RICHARD JOHNSON, P.C
2,Sam,07564,13,% R.S MIKE, V.K.S
3,Kim, Ed,12345,14,@90 KMS, %TK
Desired Output:
SNO,NAME,ZIPCODE,RANK,CARE_OF... (1 Reply)
Discussion started by: techmoris
1 Replies
8. UNIX for Advanced & Expert Users
Task is to identify files like code.1 , code.23 and so on ... (the files which are ending with a number) but it should not match files like code.123abc. So the search will normally search for files with "code." and at the end we should extract for the correct match. Now I have to remove these files... (6 Replies)
Discussion started by: diwakar_reddy
6 Replies
9. Shell Programming and Scripting
Hello All,
I need help I have a problem in searching the pattern in a file
let us say the file contains the below lines
line 1 USING *'/FILE/FOLDER/RETURN')
.................
.................
line 4 USING *'/FILE/FOLDER/6kdat1')
line 5 USING... (2 Replies)
Discussion started by: maxmave
2 Replies
10. Shell Programming and Scripting
Hello,
I have a pattern like "XXXXXX XXXXXX" which i need to make search in a input file and Replace the matched pattern to a another pattern.
This is the code i tried ..
#!/usr/bin/perl
print "Enter a File name :";
chomp ($file = <STDIN>);
print "\n Searching file :";
if (system ("ls... (2 Replies)
Discussion started by: maxmave
2 Replies