10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the below contents in a file after making the below curl call
curl ... | grep -E "state|Rno" | paste -sd',\n' | grep "Disconnected" > test
"state" : "Disconnected",, "Rno" : "5554f1d2"
"state" : "Disconnected",, "Rno" : "10587563"
"state" : "Disconnected",, "Rno" :... (2 Replies)
Discussion started by: Vaibhav H
2 Replies
2. UNIX for Dummies Questions & Answers
I am new to shell scripting. I am interested how to know how to sort a content of a file using shell scripting.
I've attached the 'Input file' and the 'expected output' to this thread.
Details provided in the expected output file will provide details on how the sort needs to be done.
... (16 Replies)
Discussion started by: nkarthik_mnnit
16 Replies
3. Shell Programming and Scripting
Hello,
I need help on.
I have a File which stores the information as below.
It is space separated file, I want to keep only unique record in file based on file name.
Also if you notice sometime filename with space appear in last column like (abc_ xyz1_bc12_20140312_c.xlsx)
03/17/2014 ... (9 Replies)
Discussion started by: kumar30213
9 Replies
4. Shell Programming and Scripting
Hi,
I am trying to get the file in particular pattern using shell script. I have to add one column to some other file.
For example consider two file as below.
File1:
name1
name2
name3
File2:
Add1 age1
Add2 age2
Add3 age3
I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies
5. Shell Programming and Scripting
Hi Gurus,
I have file content sample:
,5113955056,,TAgent-Suspend
,5119418233,,TAgent-Suspend
,5102119078,,TAgent-Suspend
filenames 120229H5_suspend, 120229H6_unsuspend
I receive those files one of directory /home/temp/
I need following:
1. Backup first /home/temp/ file to... (5 Replies)
Discussion started by: thepurple
5 Replies
6. Shell Programming and Scripting
Hello ,
i have a text file like this
1 a1 ,AB ,AC ;AD ,EE
2 a2 ,WE ;TR ,YT ,WW
3 a3 ;AS ,UY ;RF ,YT
i want to sort this text file based on each row , and excluding 2nd column from the sorting and not taking the comma or ; into consideration in the sorting, so it will become like this... (12 Replies)
Discussion started by: shelladdict
12 Replies
7. Shell Programming and Scripting
I now have a 230,000+ lines long text file formatted in segments like this:
Is there a way to sort this file to have everything in chronological order, based on the date and time in the text? In this example, I would like the result to be: (19 Replies)
Discussion started by: KidCactus
19 Replies
8. Shell Programming and Scripting
Hello,
I've done
ls -ls >fileout1
When I do the sort command for +4 it sorts it bu group. When I do +5 it sorts it by date. But it's skipping the file size column. Example:
rwxr-xr-x 1 Grueben sup 65 16 Sep 13:58 cdee
How can I sort it by file size? It doesn't... (2 Replies)
Discussion started by: Grueben
2 Replies
9. Shell Programming and Scripting
Hi,
My input file is
$cat samp
1 siva
1 raja
2 siva
1 siva
2 raja
4 venkat
i want sort this name wise...alos need to remove duplicate lines.
i am using
cat samp|awk '{print $2,$1}'|sort -u
it showing
raja 1 (3 Replies)
Discussion started by: rsivasan
3 Replies
10. Shell Programming and Scripting
Dear All,
Good day. Here i am facing some problem like below.
file contains
12345 0001 090112
14385 0001 090112
13255 0001 090112
11345 0001 090112
....
I want to sort ascending according to the first column. What will be the shell script. (4 Replies)
Discussion started by: saifurshaon
4 Replies