Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to create alias with awk command Post 302208402 by papa1980 on Monday 23rd of June 2008 07:02:43 PM
Old 06-23-2008
That is not working.Smilie

The command actualy is awk '{print $1 "| " $2 "| " $3 "| " $4 "| " $5 "| " $6 "| " $7 "| " $8 "| " $13 "| " }'
--------------------------------

ls -alrt | a
syntax error The source line is 1.
The error context is
>>> {print <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
awk: There is a missing } character.
<un0001a@hpprd011b>[/share/t11/dol/5.0/UN0001/exec] ls -alrt | a
syntax error The source line is 1.
The error context is
>>> {print <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
awk: There is a missing } character.

Last edited by papa1980; 06-23-2008 at 08:25 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

Create an alias

I want to create an alias that will grep the passwd file for the logged in persons username and then it will return the password file entry. I want to pipe the whoami info to the grep command. I have created the following: % alias whopw grep... (1 Reply)
Discussion started by: mozark
1 Replies

2. UNIX for Dummies Questions & Answers

I want to create a command alias

I want to create a command alias. I know what shell I'm using, I just don't know which file to inter the command alias. When I type "echo $SHELL" the output is as follows: bin/sh If I'm correct, this is the bourne shell. Does anyone know which file to edit in this particular shell? Thanks. (2 Replies)
Discussion started by: cstovall
2 Replies

3. Shell Programming and Scripting

Define an alias with an embeded awk command ??

Hi all, I'm trying to define an alias with an embeded awk command: alias kpipe='kill `psme| grep "ifw -r" | grep -v "grep ifw -r"| awk '{print $2}'`' The problem is that the awk command (awk '{print $2}') contains two ' ..' quotes. So bash assumes that the first awk quote corresponds to... (5 Replies)
Discussion started by: jfortes
5 Replies

4. UNIX for Dummies Questions & Answers

How to create a alias with an argument

If I want to create an alias called "cdr", and this alias need an argument (for example arg1)followed by "cdr", the result should go to the directory like "/home/ting/arg1/report/logs", the command should look like below, alias cdr arg1 "cd /home/ting/\!$1/report/logs" (not working)::( ... (1 Reply)
Discussion started by: ting123
1 Replies

5. UNIX for Dummies Questions & Answers

Unable to create alias

I am using Solaris 9 machine. I am unable to create any aliases. I gave the following command: alias ls='ls -ltr' It did nt give any errors. But next time, I use ls, it is working simply as ls but not like ls -ltr. I am not having admin permissions. Is it the reason. (3 Replies)
Discussion started by: mumashankar
3 Replies

6. Shell Programming and Scripting

Need to create an ALIAS....

Hi GUYS, I need to create an alias for the the connect statement. I want to replace "CONNECT TO DBNAME" to "CONNECT TO DBNAME user USERID using PASSWORD" I thought i will add an alias in the .profile. But its not working. May be because i am trying to create it for 3 words instead of one... (2 Replies)
Discussion started by: mac4rfree
2 Replies

7. Shell Programming and Scripting

How to alias an awk command with single and double quotes?

Hi, I am trying to write the following command as an alias in my .bashrc file. bjobs -u all | awk '{if (NR > 1) {username++;}}END{{print"\nJOBS BY USER:\n"} for (i in username) {print username,i;}{print"\n Total Jobs=",NR-1,"\n" }}' The command simply puts how many jobs each user is... (2 Replies)
Discussion started by: jacekmaciek
2 Replies

8. Shell Programming and Scripting

Alias problem with awk command

Hi to all, I'm facing some problems when adding an alias like: #alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'" and when I enter: #list I get: Syntax Error The source line is 1. The error context is { print >>> , <<< awk:... (3 Replies)
Discussion started by: enux
3 Replies

9. Shell Programming and Scripting

Create an alias

I want to create an alias cpage4 and create a postscript file For example I want to call cpage4 file.f which creates the file file.ps I have written like this but don't know how to continue alias cpage4 '/usr/bin/mpage -m40 -4AHP- \!* (6 Replies)
Discussion started by: kristinu
6 Replies

10. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies
XpInputSelected(3Xp)						 XPRINT FUNCTIONS					      XpInputSelected(3Xp)

NAME
XpInputSelected - Queries which X Print events the client has selected to receive from the specific print context. SYNOPSIS
cc [ flag... ] file... -lXp [ library... ] #include <X11/extensions/Print.h> unsigned long XpInputSelected ( display, context, event_mask ) Display *display; XPContext context; unsigned long *all_event_mask_return; ARGUMENTS
display Specifies a pointer to the Display structure; returned from XOpenDisplay. context Specifies the print context to which the query is being made. all_event_mask_return Returns the set of events that any client has selected. DESCRIPTION
XpInputSelected returns a bit mask describing which event classes the client has selected to receive. The value returned to all_event_mask_return is the union of every client's event mask. XpInputSelected queries which X Print events from the specified print context the client has selected to receive. The X Print Events are generated from a print context, and not from a window as is the case with XSelectInput. As events arrive, the context field in the event is used to determine which print context generated the event. See XpS- electInput for the event_mask and all_event_mask (??return??) values. DIAGNOSTICS
XPBadContext The specified print context is not valid. SEE ALSO
XpSelectInput(3Xp) X Version 11 libXp 1.0.0 XpInputSelected(3Xp)
All times are GMT -4. The time now is 11:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy