10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
OS : RHEL 7.2
Shell : bash
I have a file which has lines like below
I want to copy from 2nd line to the 6th line and copy(redirect) those lines to another file.
$ cat patterns.txt
hello world
hello asia
hello europe
hello africa
hello america
hello antartica
hello... (9 Replies)
Discussion started by: omega3
9 Replies
2. UNIX for Beginners Questions & Answers
Dear all,
I have stuck with this problem for some days.
I have a very big file, this file can not open by vi command.
There are 200 loops in this file, in each loop will have one line like this:
GWA quasiparticle energy with Z factor (eV)
And I need 98 lines next after this line.
Is... (6 Replies)
Discussion started by: phamnu
6 Replies
3. Shell Programming and Scripting
Hi Guys,
I have an awk script that would search the input file for line that starts with a number 3 and copies into a new text file.
I want to extend this script to find the lines that either starts with 3 or a or b and copy all those lines into the new file.
Here is what I have so far:... (1 Reply)
Discussion started by: Amith821
1 Replies
4. Shell Programming and Scripting
Hi Guys,
I have the following problem. I have original file (org.txt) that looks like this
module v_1(.....)
//arbitrary number of text lines
endmodule
module v_2(....)
//arbitrary number of text lines
endmodule
module v_3(...)
//arbitrary number of text lines
endmodule
module... (6 Replies)
Discussion started by: kaaliakahn
6 Replies
5. Shell Programming and Scripting
Okay, I've been working on a script for providing information on the progress of a backgrounded ditto command. Thanks to google and a lot of searching I've resolved all but one very odd error. At this point, I want to use xtrace (set -x) to try to uncover the issue. I have found several examples... (2 Replies)
Discussion started by: reid
2 Replies
6. Shell Programming and Scripting
Hi Guys,
I'm a DBA and need help on shell scripting.
My Oracle Database is sitting on HP-UX machine.
Anyone has a script that can spool out permission of all oracle binary files in the below directory:
/opt/ora10g/oracle/
Format to be spooled out : chmod <exisiting permission> filename... (10 Replies)
Discussion started by: ciaciachew
10 Replies
7. Shell Programming and Scripting
Hello, more of a windows wscript guy. However I took a new position that requires me to support some solaris servers. So... issue is that I need to copy all lines from a file to a temporary file and then copy them back into the original file starting at line 1. Reason I need to do this is... (5 Replies)
Discussion started by: ZigZaggin
5 Replies
8. Shell Programming and Scripting
Hello everyone. I have a log file that contains multiple domains:
www.thisdomain.com
agent.thisdomain.com
that.thisdomain.com
I need to copy all of the lines that contain "www.thisdomain.com" from the log and output them into a new file. I've tried everything with little luck. Please help... (3 Replies)
Discussion started by: aberli
3 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I'm new to shell scripting.
I want to copy the first N lines from a file to another file.
Can someone please tell me how this can be done.
Thanks
Himi (2 Replies)
Discussion started by: HIMANI
2 Replies
10. Shell Programming and Scripting
Hi all,
I'm new to shell scripting.
I want to copy initial few lines(say first 10 lines) from a file to another file.
There is no "head" command in our embedded system.
sed & awk is there which I believe will do that, but I dont know how to.
This is linux 2.6 (embedded)
So please help me.... (5 Replies)
Discussion started by: jockey007
5 Replies