Comparing wc outputs using array


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Comparing wc outputs using array
# 8  
Old 04-23-2015
Many Thanks RudiC. the logic you suggested helped me..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparing files in a directory against an array of files

I hope I can explain this correctly. I am using Bash-4.2 for my shell. I have a group of file names held in an array. I want to compare the names in this array against the names of files currently present in a directory. If the file does not exist in the directory, that is not a problem.... (5 Replies)
Discussion started by: BudMan
5 Replies

2. UNIX for Dummies Questions & Answers

gunzip outputs gibberish

I run cygwin on windows 7, and have been using the windows command line. I've been trying to gunzip some previously compressed large sequence output files in .txt.gz format. This worked for about the first 10 files and then for the rest of them the file (as viewed using the 'head' command) is... (1 Reply)
Discussion started by: woceht
1 Replies

3. UNIX for Dummies Questions & Answers

Need help with 2 similar commands with different outputs

NEVERMIND.... "$TIME" did the trick... stupid me. :o Hi, I know that this must be something pretty dumb but I cant figure it out myself. I have this: #!/bin/bash TIME="Time: 20120611" FILE=file.log grep $TIME $FILE And I get the following output: file.log:Time: 20120611... (2 Replies)
Discussion started by: RedSpyder
2 Replies

4. Shell Programming and Scripting

Comparing two array in shell script

In shell script i have two variables with value debit_sal="DOG,HIU,JIU,GYT,PPI,KIU,HUY........." debit_req='HIU, JIU, HUY, GTR, KOI, ............" i stored this two in two array arr=$(echo $debit_sal| tr "," "\n"); arr1=$(echo $debit_req| tr ", " "\n"); #(note second arry has comma with... (5 Replies)
Discussion started by: greenworld123
5 Replies

5. Shell Programming and Scripting

Array in awk outputs multiple values

Disclaimer: OP is 100% Awk beginner. I use this code on ASCII files I need to report against. awk 'BEGIN { tokens = 0 tokens = 0 tokens = 0 } { for (token in tokens) { if ($1 == token){print $0; tokens++;}}} END {for (token in tokens){ if( tokens ==... (1 Reply)
Discussion started by: alan
1 Replies

6. Shell Programming and Scripting

create outputs from other command outputs

hi friends, The code: i=1 while do filename=`/usr/bin/ls -l| awk '{ print $9}'` echo $filename>>summary.csv #Gives the name of the file stored at column 9 count=`wc -l $filename | awk '{print $1}'` echo $count>>summary.csv #Gives just the count of lines of file "filename" i=`expr... (1 Reply)
Discussion started by: rajsharma
1 Replies

7. Shell Programming and Scripting

comparing variables in awk array

Hi, I am trying to sort and display the below(like) input using awk command: Input: ------ 0;A 4;A 5;A 33;A 45;A 0;B 4;B 5;B 33;B 45;B Output (desired): (5 Replies)
Discussion started by: pvamsikr
5 Replies

8. UNIX for Dummies Questions & Answers

Comparing two strings those are outputs of echo

Hello, I have two strings those are outputs of two echo commands: $ logslist=`ls -1rt vp_lb_indv*.log | tail -1`; tail -7 $logslist | head -1 ERROR: Errors printed on pages 5,22. $ logslist=`ls -1rt vp_lb_indv*.log | tail -1`; errpages=`tail -7 $logslist | head -1`; echo... (3 Replies)
Discussion started by: memoconq
3 Replies

9. Shell Programming and Scripting

compare 2 outputs

Hello, I have a shell script that is used as follows: ./script -s <Oracle_server_name> the script returns several lines in this format: parameter name required value Current Value comments --------------- ------------- -------------- --------- My objective now is to compare 2... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

10. Shell Programming and Scripting

Printing outputs using awk.

I have a output of a command like this. the command is : bdf|sed '/^e/d'|awk '{print$2/1048576}' output : 0 0.515625 0.481979 2 2 2 7.8125 4 2 0.488281 7.8125 3.90625 4 1.95312 1 0.488281 (4 Replies)
Discussion started by: Krrishv
4 Replies
Login or Register to Ask a Question
I3-MSG(1)							     i3 Manual								 I3-MSG(1)

NAME
i3-msg - send messages to i3 window manager SYNOPSIS
i3-msg [-t type] [message] IPC MESSAGE TYPES
command The payload of the message is a command for i3 (like the commands you can bind to keys in the configuration file) and will be executed directly after receiving it. get_workspaces Gets the current workspaces. The reply will be a JSON-encoded list of workspaces. get_outputs Gets the current outputs. The reply will be a JSON-encoded list of outputs (see the reply section). get_tree Gets the layout tree. i3 uses a tree as data structure which includes every container. The reply will be the JSON-encoded tree. get_marks Gets a list of marks (identifiers for containers to easily jump to them later). The reply will be a JSON-encoded list of window marks. get_bar_config Gets the configuration (as JSON map) of the workspace bar with the given ID. If no ID is provided, an array with all configured bar IDs is returned instead. DESCRIPTION
i3-msg is a sample implementation for a client using the unix socket IPC interface to i3. EXAMPLES
# Use 1-px border for current client i3-msg "border 1pixel" # You can leave out the quotes i3-msg border normal # Dump the layout tree i3-msg -t get_tree ENVIRONMENT
I3SOCK If no ipc-socket is specified on the commandline, this variable is used to determine the path, at wich the unix domain socket is expected, on which to connect to i3. SEE ALSO
i3(1) AUTHOR
Michael Stapelberg and contributors i3 4.1.2 01/01/2013 I3-MSG(1)