Sponsored Content
Full Discussion: nawk command clarification
Top Forums Shell Programming and Scripting nawk command clarification Post 79536 by vgersh99 on Thursday 28th of July 2005 08:57:08 AM
Old 07-28-2005
not sure if that's what wanted...
Code:
 nawk '$1==p{$2=sprintf("%0" w "d",$2+1)};1' p=$JOB_NUM q=$LEN $VALUE_TABLE w=9> ./TEMP_TABLE

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

if within nawk command

I am trying to nawk through a file and if the 24.25.26 charachters in the file are "000" then print a line to a new file in one format, otherwise print a line in a different format. So far I have the following: nawk '/^1/ { if(substr($0,24,3) != 000)... (1 Reply)
Discussion started by: kshelluser
1 Replies

2. Solaris

Sun Unix command clarification

I am reading a Sunsolve document covering moving /var and am confused by one step. What does this command do (in English): Move into the existing /var directory and transfer all the data to /newvar # cd /var # tar cvf - . | (cd /newvar; tar xfBp -) (4 Replies)
Discussion started by: FredSmith
4 Replies

3. Shell Programming and Scripting

need clarification about tr -d command ?

Hi , I need your help to know the exact operation of this following code .. cat file1 | ux2dos | tr -d ''>>file2 file1 contains only one line : "DTS-PO\SPECTRUM WO 56" the data contains a META CHAR "\" .. look at the above line. But , The file2 output contains :... (7 Replies)
Discussion started by: vparunkumar
7 Replies

4. Shell Programming and Scripting

clarification Required in Write command

Hi All, can you please help me to get clarified about the 'write' command. I have a script that sends a content of a file msg.txt to other user 'User B' using 'write' command. Script: ------ ..... cat msg.txt | write "user B" ..... Issue: I face a issue here, this scripts sends... (3 Replies)
Discussion started by: little_wonder
3 Replies

5. UNIX for Dummies Questions & Answers

Clarification on '1 days ago' in date command [Found answer, posted within]

I know the topic of getting yesterday's date has been covered ad nauseum, but I just want to be clear on something. I recently started using the command date --date='1 days ago' '+%m/%d/%y' to get yesterday's date and it's been working great. I just want to be certain that it is going to... (1 Reply)
Discussion started by: DeCoTwc
1 Replies

6. Shell Programming and Scripting

Help to use NAWK command

Hi, I am using NAWK command to scan a file (test.txt) and to create new files based on the length of lines in the file test.txt. My requirement is I need to create test_good with records having line lenght less than 4 and to create test_bad with records having line lenght more than 4. I... (4 Replies)
Discussion started by: sbhuvana20
4 Replies

7. Shell Programming and Scripting

Linux Command Error for nawk command

Hi All We are migrating our projects from unix environment to linux. I tried running a install script which sets up my project, i.e. the directory structure and all. But in the middle of the script i started receiveing following error : nawk: command not found . So i need to know which... (1 Reply)
Discussion started by: vee_789
1 Replies

8. HP-UX

su command clarification

Hi, I want to use the "SU" command in script it is asking me to enter the password manually. pleas the say the syntax of su command in single line that includes username/password. :) (3 Replies)
Discussion started by: vigneshwaran007
3 Replies

9. Shell Programming and Scripting

Net rpc command clarification

Hi, I am checking below command to see the status of windows service from unix but due to "!" sign it is not accepting password. Please suggest alternative what should i do resolve the issue. net rpc service status W32Time -I 10.1.1.1 -U "mydomain\admin%Passwod12!" One more thing... (1 Reply)
Discussion started by: learnbash
1 Replies

10. Shell Programming and Scripting

Clarification on Case command

Hi, I'm a newbie to shell programming and have just written a small program to transfer files. # job variables RunMode=$1 export DATETIME=`date +%Y%m%d%H%M%S` export STARTTIME=`date +%Y%m%d%H%M` export ShellDir=/rosetlt/scripts/ksh export LogDir=/rosetlt/scripts/log export... (2 Replies)
Discussion started by: narayanv
2 Replies
ucblinks(1B)					     SunOS/BSD Compatibility Package Commands					      ucblinks(1B)

NAME
ucblinks - adds /dev entries to give SunOS 4.x compatible names to SunOS 5.x devices SYNOPSIS
/usr/ucb/ucblinks [-e rulebase] [-r rootdir] DESCRIPTION
ucblinks creates symbolic links under the /dev directory for devices whose SunOS 5.x names differ from their SunOS 4.x names. Where possi- ble, these symbolic links point to the device's SunOS 5.x name rather than to the actual /devices entry. ucblinks does not remove unneeded compatibility links; these must be removed by hand. ucblinks should be called each time the system is reconfiguration-booted, after any new SunOS 5.x links that are needed have been created, since the reconfiguration may have resulted in more compatibility names being needed. In releases prior to SunOS 5.4, ucblinks used a nawk rule-base to construct the SunOS 4.x compatible names. ucblinks no longer uses nawk for the default operation, although nawk rule-bases can still be specifed with the -e option. The nawk rule-base equivalent to the SunOS 5.4 default operation can be found in /usr/ucblib/ucblinks.awk. OPTIONS
-e rulebase Specify rulebase as the file containing nawk(1) pattern-action statements. -r rootdir Specify rootdir as the directory under which dev and devices will be found, rather than the standard root directory /. FILES
/usr/ucblib/ucblinks.awk sample rule-base for compatibility links ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
devlinks(1M), disks(1M), ports(1M), tapes(1M), attributes(5) SunOS 5.10 13 Apr 1994 ucblinks(1B)
All times are GMT -4. The time now is 09:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy