10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have an array, that works well. But, I want to have it display every other line. Like so, 1, 3, 5, 7, etc, etc.
Here is the relevant code:
I'm sorry for the pastebin link. For some reason, I can't get the code to format properly with the code tags.
code tags work fine... everyone... (4 Replies)
Discussion started by: ignatius
4 Replies
2. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
3. Red Hat
Hello all
I have a query (SQL) that returns a rather long field from an Oracle database. The field in question is defined on 400 characters but all these 400 cannot be displayed by the echo command. Thus when I launch the following command:
echo "SELECT FIELD01 FROM TABLE_NAME;" | sqlplus -s... (9 Replies)
Discussion started by: S. BASU
9 Replies
4. Shell Programming and Scripting
Hi,
I am trying with the below Perl command to print the first field when the second field matches the given pattern:
perl -lane 'open F, "< myfile"; for $i (<F>) {chomp $i; if ($F =~ /patt$/) {my $f = (split(" ", $i)); print "$f";}} close F' dummy_file
I know I can achieve the same with the... (7 Replies)
Discussion started by: royalibrahim
7 Replies
5. Shell Programming and Scripting
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Discussion started by: vivek d r
1 Replies
6. Shell Programming and Scripting
Hi Guys
I have the following file
Essentially, I am trying to find the right awk/sed syntax in order to produce the following 3 distinct files from the file above:
Basically, I want to print the lines of the file as long as the second field of the current line is equal to the... (9 Replies)
Discussion started by: moutaye
9 Replies
7. Shell Programming and Scripting
Version: AIX 6.1 (korn shell)
In the below output, the field with the heading 'Address' has some names like
hwproc214-priv1.gnas.wrd.netwhich are only partially displayed.
$ netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en2 1500 link#2 ... (3 Replies)
Discussion started by: polavan
3 Replies
8. Shell Programming and Scripting
Howdy.
I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited?
Example:
You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies
9. UNIX for Dummies Questions & Answers
hi...
i need to display the last line of the file and capture the line in to a variable in unix envt.(not the perl ones)... please help (8 Replies)
Discussion started by: lmadhuri
8 Replies
10. UNIX for Dummies Questions & Answers
how do i display just the first line of a file with the cat command or any command for that matter (4 Replies)
Discussion started by: imuuk
4 Replies