10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to split a file into two of different locations by re-direction in awk.
cat infle
aaa 1 3
bbb 2 4
aaa 3 3
bbb 4 4
aaa 5 3
bbb 6 4
cat /storage/tmp/group_a.gtf
aaa 1 3
aaa 3 3
aaa 5 3
cat /storage/tmp/group_b.gtf
bbb 2 4
bbb ... (2 Replies)
Discussion started by: yifangt
2 Replies
2. Shell Programming and Scripting
Hi everyone,
I'm trying to write a small script to automatize row data treatment. However, I got some trouble with the awk command.
I want to use awk to extract a define paragraph from a text file. The first and final lines are defined externally in two variables called debut and fin.
I... (2 Replies)
Discussion started by: TeaTimeSF
2 Replies
3. Shell Programming and Scripting
Hi All,
I am trying to find out awk one liner for the following requirement but failed in doing that.
I have two files.
Content of first file:
file1.txt SUCCESS A
file2.txt SUCCESS B
file3.txt SUCCESS A
file4.txt FAIL ... (7 Replies)
Discussion started by: angshuman
7 Replies
4. Shell Programming and Scripting
Hello;
I have:
ll | grep -v ^d | awk '{print $9}'
rcx_access_report_fid.txt
rcx_access_report_hsi.txt
rcx_access_report_mmm.txt
rcx_access_report_qsc.txt
I want to get:
rcx_access_report_fid.txt
rcx_access_report_hsi
rcx_access_report_mmm
rcx_access_report_qsc
But when I try: (9 Replies)
Discussion started by: delphys
9 Replies
5. Shell Programming and Scripting
I tried to parse data from switch configuration files
vlan 1727 name SQ5506-15 by port
tagged ethe 8/1 to 8/2
untagged ethe 1/13
!
vlan 2105 name SQ5620-7007(BR2) by port
tagged ethe 8/1 to 8/2
untagged ethe 1/17
!
interface ethernet 1/13
port-name SQ5506-15.nic0
rate-limit... (2 Replies)
Discussion started by: winggundamth
2 Replies
6. Shell Programming and Scripting
Hi,
I've a php scirpt that calls in an external class. The external class, myClass, has several public and private functions.
There is one public function which derives a value that I want be able to bring it to the main php scirpt. Here is the code.
....snip....
include... (1 Reply)
Discussion started by: nitin
1 Replies
7. Shell Programming and Scripting
I would like to create a variable within my bash script using awk. I'm reading in a line from an external file, then outputting to a new file in a specific format. But, it doesnt quite work as I have expected and could use some help.
(A pertinent excerpt of ) the bash code is:
count=1
... (4 Replies)
Discussion started by: snoitacilppa
4 Replies
8. Shell Programming and Scripting
hi all i am trying to save an awk value into an array in bash:
total=`awk '{sum+=$3} END {print sum}' "$count".txt"`
((count++))
the above statement is in a while loop..
$count is to keep track of file numbers (1.txt,2.txt,3.txt,etc.)
i get the following error:
./lines1:... (1 Reply)
Discussion started by: npatwardhan
1 Replies
9. Shell Programming and Scripting
If I run this
# ssh remote-server 'du -sk /usr/platform/`uname -i`/'
174 /usr/platform/SUNW,Sun-Fire-V245
I get my output just fine,
However, if i try to do the same but populate a local variable within my script called for example 'result'
#!/bin/ksh
result=`ssh remote-server... (3 Replies)
Discussion started by: hcclnoodles
3 Replies
10. Shell Programming and Scripting
Hi there
i am trying to pass the result of a remote command into a variable into my script
ie
#!/bin/sh
var = `ssh remote_box 'uname'`
echo $var
but all i get back is
./script.sh: var: not found
However when i add a -x to put it into diag mode i get the following
+ ssh... (2 Replies)
Discussion started by: hcclnoodles
2 Replies