10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Data file example
I look for primary and * to isolate the interesting slot number.
slot=`sed '/^primary$/,/\*/!d' filename | tail -1 | sed s'/*//' | awk '{print $1" "$2}'`
Now I want to get the Touch line for only the associate slot number, in this case, because the asterisk... (2 Replies)
Discussion started by: popeye
2 Replies
2. Shell Programming and Scripting
Hi,
I need some help with the following: I need all lines in a file divisible by three, so for a file like this:
1
11
111
I want to add characters to make them all divisible by three (e.g. with an X):
1XX
11X
111
I would like to also ignore all lines that begin with the... (2 Replies)
Discussion started by: mikey11415
2 Replies
3. Shell Programming and Scripting
I have hundreds of files to process. In each file
I need to look for a pattern then
extract value(s) from next line and then
search for value(s) selected from point (2) in the same file at a specific position.
HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V
TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
4. UNIX for Dummies Questions & Answers
Dear all,
Greetings.
I would like to ask for your help to extract lines with specific words in addition 2 lines before and after these lines by using awk or sed.
For example, the input file is:
1 ak1 abc1.0
1 ak2 abc1.0
1 ak3 abc1.0
1 ak4 abc1.0
1 ak5 abc1.1
1 ak6 abc1.1
1 ak7... (7 Replies)
Discussion started by: Amanda Low
7 Replies
5. Shell Programming and Scripting
input
tophr5:178975153-178982740:+
tophrX:14502176-14502376:+
output
>tophr5:178975153-178982740:+
tophr5:178975153-178982740:+
>tophrX:14502176-14502376:+
tophrX:14502176-14502376:+ (2 Replies)
Discussion started by: quincyjones
2 Replies
6. Shell Programming and Scripting
Dear All,
Please apology to me if this question already posted, because I try to find it but not found.
I have make bash script to automatically download data from ftp and this running very well. and after the data downloaded it will automatically extract the data and keep in the specific... (2 Replies)
Discussion started by: chenboly
2 Replies
7. Shell Programming and Scripting
I want a shell script which extract data from a log file which contains date and time-wise data and i need the data for a perticular interval of time...what can i do??? (3 Replies)
Discussion started by: abhishek27
3 Replies
8. Shell Programming and Scripting
Hi all,
I am new to UNIX, so sorry if my question seem stupid to u.
well i want to replace the first character of first 30 lines of a file, only if the first character is h.
and
in anothe script i want to replace a particular string/character say hello/h of a file.Condition: It should... (1 Reply)
Discussion started by: abovais
1 Replies
9. UNIX for Dummies Questions & Answers
I have a file listing IP addresses, 1 per line, such as:
1.2.3.4
3.4.5.6
12.13.14.15
7.8.9.6
I want all of the entries to be on the same line, and quoted, such as:
"1.2.3.4" "3.4.5.6" "12.13.14.15" "7.8.9.6"
I got the quotes on there in vi with ":%s/^/"/g" and "%s/$/"/g" ... is there... (8 Replies)
Discussion started by: earnstaf
8 Replies
10. Shell Programming and Scripting
Hi
I use sed in a script for severall changes in files. I whish one of the substitutions I made to be aplied to every line that has the word "scripts" with the exception for the ones that start with "rsh", wich I wish sed to ignore . Is this possible? If yes, how can I do it?
The substitution... (2 Replies)
Discussion started by: Scarlos
2 Replies