10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
2. UNIX for Beginners Questions & Answers
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
3. Shell Programming and Scripting
Hi,
I have multiple files that read:
Asa.txt
Bad.txt
Gnu.txt
And I want to rename them using awk to
Asa_ddmmyytt.txt and so on
...
If there is a single command or more efficient executable please share!
Thanks! (4 Replies)
Discussion started by: Jesshelle David
4 Replies
4. Shell Programming and Scripting
I am trying to match $1-$7 between the two files and if a match is found then the contents of $8 in file2 and copied over. The awk I tried is below. There is also a header row in file2 that has the Chr Start End Ref Alt that does not need to be searched. Thank you :).
awk
awk... (3 Replies)
Discussion started by: cmccabe
3 Replies
5. Shell Programming and Scripting
// Redhat
I am running a cron with cp every 15 minutes.
cp /p2/arch/log/* /p2/bkp
What I need is to not to copy the file again if the filename already exists under /p2/bkp
The reason is that the file size under /p2/arch/log/ will be reduced (contents truncated), so I need to keep the... (10 Replies)
Discussion started by: Daniel Gate
10 Replies
6. Shell Programming and Scripting
How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ?
---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ----------
Ok. Got it.
mv /A/*/ /B/ (1 Reply)
Discussion started by: DHeisenberg
1 Replies
7. UNIX for Advanced & Expert Users
Here is my dir structure:
/tmp/dave/myappend.txt
/tmp/dave/dir1/test.txt
/tmp/dave/dir2/test.txt
/tmp/dave/dir3/test.txt
/tmp/dave/dir4/test.txt
I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/
I have tried this:... (2 Replies)
Discussion started by: bigd213
2 Replies
8. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
9. Shell Programming and Scripting
Hi,
I wanted to compare EDI files present in Two different Directories which can be related by the file names. While comparing the EDI files i have to skip selected segments such as "ISA" "IEA" and "GS" "GE" since this may have datetime stamp and different "Sender" "Receiver" Qual.
and... (3 Replies)
Discussion started by: Sivas
3 Replies
10. Shell Programming and Scripting
Hello All,
I have a file like this:
PART A1
PART A2
%
PART B1
PART B2
The last line in the file (PART B2) does not end with a new line. i.e <EOF> immediately follows "PART B2".
Here is my problem: I want to print everything after '%'.
So, I tried:
sed '1,/%/ d' .
This works... (6 Replies)
Discussion started by: aghoras
6 Replies