Sponsored Content
Top Forums Shell Programming and Scripting Execution of awk command in a variable Post 302222684 by patelamit009 on Thursday 7th of August 2008 10:34:35 AM
Old 08-07-2008
Data Execution of awk command in a variable

Hi All,

I have a awk command that is stored in a variable.

the value of the variable cmd is:
(mean output of echo $cmd is: )

awk -F";" '{print $1}'

Now I want to execute this command.

How can I do that????

Quick Reply will be appreciated.

Regards,
Amit
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execution problems using awk command.

Hi All, I have the following requirement. In a directory i get files from external source. I at regular intervals check that directory for any incoming files. The file name is underscore delimited. Such as: aaa_bbb_ccc_ddd_eee_fff.dat I am using awk and and splitting the file name. ... (4 Replies)
Discussion started by: satishpv_2002
4 Replies

2. Shell Programming and Scripting

How to use same variable value inside as well as outside of the awk command?

Hi Jim, The following script is in working state. But i m having one more problem with awk cmd. Could you tell me how to use any variable inside awk or how to take any variable value outside awk. My problem is i want to maintain one property file in which i am declaring variable value into that... (12 Replies)
Discussion started by: Ganesh Khandare
12 Replies

3. Shell Programming and Scripting

Variable as input to awk command

Hi Gurus, I need a suggestion, please help. I have a input file as below : abc.txt : * xxxx: 00000 xxxxx: 00000 xxxx: RANDOM xxx: RANDOM **************************xxxxxxx*** * abc ****************************** abc: abc: ... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

4. Shell Programming and Scripting

Variable in AWK command help

here is what i have so far delim=`cat $HOME/tmp/interchange_hold | head -1 | cut -b4` cat $HOME/tmp/rawfile_hold | ( while read line se_check=`echo $line | awk -F: -v awkvar="$delim" '{ print $1}'` delim will hold the 4th char of a file. Lets say that char is a * the line im... (2 Replies)
Discussion started by: blesjt02
2 Replies

5. UNIX for Dummies Questions & Answers

Using a variable in the awk command

Hi Guys, Can anyone of you please tell me how to use a variable inside a awk command. For ex - if am printing the third column with respect to a pattern with delimiter ~ awk -F~ '$3=="pattern"' <file name> - This works, Now here I have a set of patterns in a file and I want to put it in... (1 Reply)
Discussion started by: abhisheksunkari
1 Replies

6. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

7. Shell Programming and Scripting

Using variable in awk command

Have a small doubt . While using an iterator , i need to take the fields as seen as below . But the Iterator is not been displayed . Can you please help with this . Code: ITERATOR=0COUNT=`cat test.txt`echo "$COUNT" while do echo $ITERATOR echo "$COUNT" awk... (3 Replies)
Discussion started by: Ravi_Teja
3 Replies

8. Shell Programming and Scripting

Storing awk command in a variable

I'm working on a script in which gives certain details in its output depending on user-specified options. So, what I'd like to do is something like: if then awkcmd='some_awk_command' else awkcmd='some_other_awk_command' fi Then, later in the script, we'd do something like: ... (5 Replies)
Discussion started by: treesloth
5 Replies

9. Shell Programming and Scripting

Execution Problem with awk command

Hi All, I am trying to find a word from a file in loop. while read i; do DB_Name=$i awk '{for(i=1;i<=NF;i++)if($i~/$DB_Name/)print $(i)}' $BTEQ_NAME > $DB_Name_TableList.txt done <Param.txt here Param.txt contents data as ODS_TARGT_RECV FIN_TARGT... (7 Replies)
Discussion started by: Shilpi Gupta
7 Replies

10. Shell Programming and Scripting

Variable in awk command

Hello All, I am trying to run a script to extract data from the file. The format of the file is as below: filename: sample.log 12345| ABCD 23456| GKHY 33454| ABCD 98765| TTRRI want to run a command in AWK as show below extract.sh #!/bin/bash echo... (2 Replies)
Discussion started by: chetanojha
2 Replies
PCLOCK(1)						      General Commands Manual							 PCLOCK(1)

NAME
pclock - pixmap clock SYNOPSIS
pclock [options] DESCRIPTION
This manual page documents briefly the pclock command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. pclock is a program that places a small analog clock program on the desktop of X. It was designed to run under the WindowMaker window man- ager. It uses any 64x64 pixmap as a background. OPTIONS
The programs follow the usual GNU command line syntax, with long options starting with two dashes (`-') and short optoins starting with one dash. A summary of options is included below. -B PIXMAP, --background=PIXMAP Use the given pixmap as the clock background (size must be 64x64). -H COLOR, --hands-color=COLOR Draw the hands (hour, minute and second) in the specified color. -S COLOR, --second-hand-color Draw the second hand in the specified color -h, --help Show summary of options. --hour-hand-length=INT Draw the hour hand with the specified length of INT. --minute-hand-length=INT Draw the minute hand with the specified length of INT. --second-hand-length=INT Draw the second hand with the specified length of INT. --second-hand-width=INT Draw the minute hand with the specified width of INT. -s, --second-hand Don't display the second hand. -v, --version Show version of program. -w, --withdrawn Don't start up in a withdrawn (iconic) state. AUTHOR
This manual page was written by Darren Benham <gecko@debian.org>, for the Debian GNU/Linux system (but may be used by others). The soft- ware is copyrighted (c) 1998 by and released under the GPL v2. Author: Alexander Kourakos <Alexander@Kourakos.com> Web: http://www.kourakos.com/~awk/pclock/ PCLOCK(1)
All times are GMT -4. The time now is 01:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy