10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
2. Shell Programming and Scripting
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.
fc2/12 is up
Port description is SEIEDISCOVER-3
Speed is 4 Gbps
fc2/13 is down (Administratively down)
fc2/14 is up
Port... (1 Reply)
Discussion started by: kieranfoley
1 Replies
3. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
4. UNIX for Dummies Questions & Answers
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies
5. Shell Programming and Scripting
Hi
I have a file like
# vi require.txt
1,BANK,Read blocks that cycle.
yellow
Read blocks.
2,ACCOUNT,Finished
Red
Finished .
3,LOAN, pipe
white
pipe
4,PROFIT,Resolve.
black
Resolve
Am using like
cat require.txt | grep -w ACCOUNTThe output I get is (8 Replies)
Discussion started by: Priya Amaresh
8 Replies
6. Shell Programming and Scripting
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies
7. Shell Programming and Scripting
Hi,
I am trying to get an output like :
+----------------------------------+ ----------- +
+ some variable substitution + some text +
Is there a way I can specify in printf (in ksh) the particular position I want to print a character, and also repeat a character from... (1 Reply)
Discussion started by: neil.k
1 Replies
8. Shell Programming and Scripting
Hello,
I want to print a number of lines of a file after a specific expression of a line.
I have this sed command but it prints only 1 line after the expression.
How could I adapt it to print for instance 10 lines after or 15 lines after ?
sed -n '/regexp/{n;p;}'
Thx & Regs,
Rany. (5 Replies)
Discussion started by: rany1
5 Replies
9. Shell Programming and Scripting
Hi,
I have a script that fetches only specific information from fcinfo command. Below is a portion of the script.
#!/usr/bin/ksh
set -x
HBA_COUNT=`sudo fcinfo hba-port | grep -i state | awk 'END{print NR}'`
echo "$HBA_COUNT HBAs exist"
echo '........'
INDEX=1
while $INDEX -le... (2 Replies)
Discussion started by: jake_won
2 Replies
10. UNIX for Dummies Questions & Answers
I am trying to write a script that when triggered by an ip address it will run the following
export DAVIDCOUNT=`(fgrep -ce 140.147.146.146 /export/home/ipconnect.txt) >> /local/cron/test_listen_out`;
I think this is my problem line.
What I like this line to do is when it sees the... (6 Replies)
Discussion started by: clay
6 Replies