10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using the below script to delete duplicate files but it is not working for directories with more than 10k files "Argument is too long" is getting for ls -t. Tried to replace ls -t with
find . -type f \( -iname "*.xml" \) -printf '%T@ %p\n' | sort -rg | sed -r 's/* //' | awk... (8 Replies)
Discussion started by: gold2k8
8 Replies
2. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
3. Shell Programming and Scripting
I want to delete a part of the 4th column from the given file below:
<Text Text_ID="10155645315851111_10155645333076543" From="460350337461111" Created="2011-03-16T17:05:37+0000" use_count="123">This is the first text</Text>
<Text Text_ID="10155645315851111_10155645317023456"... (2 Replies)
Discussion started by: my_Perl
2 Replies
4. Shell Programming and Scripting
I've got a file that looks like this (the whitespace between commas is intentional):
123456789,12,JOHN H DOE ,DOE/JOHN H ,,,DOE/JOHN H ,,,,,123 FAKE STREET ,SPRINGFIELD,XX,
I want to strip just the first name out of the third field so it reads "JOHN,". So far I... (6 Replies)
Discussion started by: Scottie1954
6 Replies
5. Shell Programming and Scripting
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies
6. Shell Programming and Scripting
Hello,
I am on solaris (ksh). I have a log file like this with directory structure and file name :
/DIR1/DIR2/DIR3/filename
/DIR1/DIR2/filename
/DIR1/DIR2/DIR3/DIR4/DIR5/filename
I am looking for a way to create a new file to be formated like this :
DIR2/DIR3
DIR2... (9 Replies)
Discussion started by: Aswex
9 Replies
7. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
8. Shell Programming and Scripting
Hi,
I've a file as below-
I need to delete only the part of the line after the pattern 'extent /lock' and my output has to be like below.
Thanks (7 Replies)
Discussion started by: dvah
7 Replies
9. Shell Programming and Scripting
Hi all!
How can I delete all the text starting from <string1> to <string2> in all the .txt files of the folder "FOLDER" ?
Thanks a lot!
mjomba
...
</s>
<s>
<w></w>
</s>
<s>
...
to get: (1 Reply)
Discussion started by: mjomba
1 Replies
10. Shell Programming and Scripting
Suppose i have a file which contains 10 lines....
i have to delete a line which starts with the word "BEGIN"
and delete the consecutive lines till i find a start of line with the word "END"
how to do this? (6 Replies)
Discussion started by: brkavi_in
6 Replies