12-26-2012
Need awk good link
Guys,
I am always struggling with awk and sed commands in UNIX,especially while writing shell script. Can you please suggest some good websites?
Cheers,
Aravind
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to shell script.I need a link which explains basic concepts for shell scrpting (1 Reply)
Discussion started by: rajareddy_24
1 Replies
2. UNIX for Dummies Questions & Answers
awk -F^ '{ if ((($1 != "M") && ($5 != "2")) || (($1 != "S") && ($5 != "7"))) print $0}' welcome > welcome1
The "&&" and "||" in the above command is not working with awk.
When I run the above command, the same content of welcome is copied to welcome1 without any difference.
Your reply is... (12 Replies)
Discussion started by: karthickrn
12 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys,
I need to learn awk and looking for some good resource with example. I have been using Unix from long time but awk is something always allude me. would be great if you guys could point me on some good stuff but less complicated one :)
Thanks
Javin (2 Replies)
Discussion started by: javabuddy
2 Replies
4. Programming
Hello All,
I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it:
I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable
Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies
5. Shell Programming and Scripting
I have problem
find "$@" -type l -printf "%l\n" 2>/dev/null | awk -F/ '
NF > n {deepest = $0; n=NF}
END {print "Output:", deepest}'
My script should search all arguments which are directories for longest symbolic link path but i want Output to be this way
Output:
'/xxx/xxx/xxx/link ->... (1 Reply)
Discussion started by: xpukm
1 Replies
6. Solaris
Hi All
I am facing an issue with our new solaris machine.
in /var/adm/messages
root@Prod-App1:/var/tmp#
root@Prod-App1:/var/tmp#
root@Prod-App1:/var/tmp# cat /var/adm//messages
Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved
Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies
7. Solaris
Hi All
I am facing an issue with our new solaris machine.
in /var/adm/messages
Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off
Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex
Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies
8. Shell Programming and Scripting
I am not sure if I am posting to the right forum but I would like to buy a book which goes into Awk in detail and covers the most advanced Awk programming techniques. Would anybody be able to recommend a good book? I see plenty of books available on Amazon but I am not sure how detailed they are.... (2 Replies)
Discussion started by: kieranfoley
2 Replies
9. Shell Programming and Scripting
The awk below will create sub-directories in a directory (which is always the last line of file1, each block separated by an empty line), if the number in line 2 (always the first 6 digits in the format xx-xxxx) of file2 is found in $2 of file1. This is the current awk output.
If there is a... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT OSF1
mkmanifest
mkmanifest(1) General Commands Manual mkmanifest(1)
NAME
mkmanifest - mtools utility to create a shell script to restore UNIX file names from DOS
SYNOPSIS
mkmanifest [files]
OPTIONS
None
OPERANDS
A list of UNIX file names to be converted to DOS name format.
DESCRIPTION
The mkmanifest command creates a shell script that aids in the restore of UNIX file names that were overwritten by DOS file name restric-
tions. DOS file names are uppercase only, cannot exceed 8 character names, 3 character extensions and do not support device names or non-
alphanumeric characters.
Not all UNIX file names are supported in the DOS world. The mtools commands may have to change UNIX names to fit the DOS file name conven-
tions. Most commands provide the verbose option (-v), that displays new file names if they have been changed. The following table shows
some examples of file name conversions:
-----------------------------------------------
UNIX name DOS name Reason for the change
-----------------------------------------------
thisisatest THISISAT file name too long
file.stuff FILE.STU extension too long
prn.txt XRN.TXT PRN is a device name
.abc X.ABC null file name
hot+cold HOTXCOLD illegal character
-----------------------------------------------
EXIT STATUS
The following exit values are returned: Success. Failure.
EXAMPLES
Assume you have the following UNIX files that you want to copy to a DOS diskette using the mcopy command.
very_long_name 2.many.dots illegal: good.c prn.dev Capital
The mcopy command converts these file names to the following:
very_lon 2xmany.dot illegalx good.c xprn.dev capital
To restore the previous file names, use the mkmanifest command as follows: mkmanifest very_long_name 2.many.dots illegal:
good.c prn.dev Capital > manifest
The previous mkmanifest command line produces the following: mv very_lon very_long_name mv 2xmany.dot 2.many.dots mv illegalx illegal: mv
xprn.dev prn.dev mv capital Capital
The good.c file name did not require conversion, hence it was not included in the output.
If these files were copied from diskette to another UNIX system, and you wanted to restore the original names, retain a copy of the mani-
fest file (captured output) so that it can be used to convert the file names again.
FILES
Executable file
SEE ALSO
Commands: mcopy(1), mtools(1)
mkmanifest(1)