10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The bash below executes and seems to work fine on those files in which . However on those files where there is no additional CNV detected that line repeats multiple times
instead of only once. I tried adding an END as all lines are printed but that doesn't help. I can not seem to solve this... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. Shell Programming and Scripting
Hi,
I'm having trouble in achieving the following scenario. There is a txt file with thousands of lines and few lines are repeated, which needs to be removed using a script.
File.txt
20140522121432,0,12,ram
Loc=India
From=ram@xxx.com, To=ravi@yyy.com,,
1
2
3
4
.
.
30... (18 Replies)
Discussion started by: Gautham
18 Replies
3. Shell Programming and Scripting
Hi !
I need some help with a script I am writing.
I am trying to compare two files, the first file being in this format :
Header1
Text1-1
Text1-2
Text1-3
Header2
Text2-1
etc...
For each header, I want to check if it appears in the second file, and if it is the case print the header... (4 Replies)
Discussion started by: jbi
4 Replies
4. Shell Programming and Scripting
*log files are in date order
sample logs...
ciscoresets_20120314
ciscoresets_20120313
ciscoresets_20120312
ciscoresets_20120311
ciscoresets_20120310
cat ciscoresets_20120314
SYDGRE04,10,9
SYDGRE04,10,10
SYDGRE04,10,11
SYDGRE04,10,12
SYDGRE04,10,13
SYDGRE04,10,14
SYDGRE04,10,15... (2 Replies)
Discussion started by: slashbash
2 Replies
5. Shell Programming and Scripting
Hey Guys!
I have written a code which combines lots of files into one big file(.csv).
However, each of the original files had headers on the first line, and now that I've combined the files the headers are interspersed throughout the new combined data frame. For example, throughout the data... (21 Replies)
Discussion started by: gd9629
21 Replies
6. Shell Programming and Scripting
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies
7. UNIX for Dummies Questions & Answers
I know uniq exists, but am not sure how to remove repeating lines when they are groups of two different lines repeating themselves, without using sort. I need them to be sorted in the original order, just to remove repeats.
cd /media/AUDIO/WAVE/9780743518673/mp3
~/Desktop/mp3-to-m4b... (1 Reply)
Discussion started by: glev2005
1 Replies
8. Shell Programming and Scripting
Hello,
I have file to work with. It has 5 columns. The first three, altogether, constitutes the position. The 4th column contains some values for downstream analysis and the fifth column contains some values that I want to add to 4th column (only if they happen to be in the same position).
My... (5 Replies)
Discussion started by: menenuh
5 Replies
9. Shell Programming and Scripting
I need to add the content of file1 to file2 - all lines but not those existing in file2 already, so the "cat file1 >> file2" doesn't work.
For example,
file1:
100 xxxxxx str1
102 xxxxxx str2
File2:
50 xxxxxxx xxx
30 xxxxxxxxxxx
102 xxxxxx str2 xxxx
......
the result:
50 xxxxxxx... (9 Replies)
Discussion started by: bluemoon1
9 Replies
10. UNIX for Dummies Questions & Answers
Can someone help me with the following 2 objectives?
1) The following command is just an example. It gets a list of all print jobs. From there I am trying to extract the printer name. It works with the following command:
lpstat -W "completed" -o | awk -F- '{ print $1}'
Problem is, I want... (6 Replies)
Discussion started by: TheCrunge
6 Replies