10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
All,
I have some sample text file(.csv) in the below format. In my actual file there are at least 100K rows.
date 03/25/2016
A,B,C
D,E,F
date 03/26/2016
1,2,3
4,5,6
date 03/27/2016
6,4,3
4,5,6
I require the following output where in the date appeared at different locations need to... (3 Replies)
Discussion started by: ks_reddy
3 Replies
2. Shell Programming and Scripting
Hi
I want to implement something like this:
if( keyword1 exists)
then
check if(keyword2 exists in the same line)
then replace keyword 2 with New_Keyword
else
Add New_Keyword at the end of line
end if
eg:
Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies
3. Shell Programming and Scripting
Hi,
Can someone help me to get the shortest command
Input file
=========
I|know|"english|french"
It|can|have|four|delimiters
Desired output
===========
"english|french"
have
If I use cut -d "|" -f3 , i am getting "english as 3rd field.But I would like to get the whole text in... (2 Replies)
Discussion started by: anandapani
2 Replies
4. UNIX Desktop Questions & Answers
Hi;
I have a text file like this:
1
10
11
2
3
4
M
X
Y
When I sort it numerically using sort -n, it looks like this:
Y
X
M
1
2
3
4
10 (3 Replies)
Discussion started by: a_bahreini
3 Replies
5. Shell Programming and Scripting
I have a tab delimited file with 5 columns
79 A B 20.2340 6.1488 8.5086 1.3838
87 A B 0.1310 0.0382 0.0054 0.1413
88 A B 46.1651 99.0000 21.8107 0.2203
89 A B 0.1400 0.1132 0.0151 0.1334
114 A B 0.1088 0.0522 0.0057 0.1083
115 A B... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
6. Shell Programming and Scripting
In unix how to sort in reverse order based on second field in a text file.
$ cat data1
David:501
Albie:503
Shaun:502
The expected output:
Albie:503
Shaun:502
David:501
Please help :) (4 Replies)
Discussion started by: jon2ryhme
4 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I had a query on the usage of $0 in shells. I would appreciate any assistance in this.
We moved from a sun solaris server to a linux server. I ran 2 different pieces on these servers and in one case, the outputs didnt change and in the other case, the outputs were different. The 2... (3 Replies)
Discussion started by: novice1324
3 Replies
8. UNIX for Dummies Questions & Answers
i need help with my script....
i am suppose to grab files within a certain date range
now i have done that already using the touch and find command (found them in other threads)
touch -d "$date_start" ./tmp1
touch -d "$date_end" ./tmp2
find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies
9. Shell Programming and Scripting
Hi
Having a file as below
file.txt
error Server Network Name Dept Date Time
===========================================================================================================================
0 ServerA LAN1 AAA IT01 04/30/2008 09:16:26
0 ... (3 Replies)
Discussion started by: karthikn7974
3 Replies
10. Shell Programming and Scripting
hello,
I've got a lil shell program, which gets some directories as parameters.How can I sort this directories with respect to the nr of files they contain? The dir with the most files should be printed first.
i've tried with ls -1|wc -w but i can't save this value and can not save the... (0 Replies)
Discussion started by: atticus
0 Replies