If it's a small file, then a very simple ksh version may be sufficient:-
You can format the column width with typeset commands if you wish.
The variable substitution with $remote is as follows:-
${remote%.*} says to remove everything from end of $remote at the shortest length that matches a dot, i.e. you get the first four parts. ${remote##*.} says to remove everything from start of $remote at the longest length that matches a dot, i.e. you are left with the last part.
I hope that this helps.
Robin
Liverpool/Blackburn
UK
Last edited by rbatte1; 10-08-2013 at 01:22 PM..
Reason: Detail about variable substitution/slicing
Is there a way with HP-UX Release 10.20 (but going to HP-UX 11) to convert a regular "text" file to a packed data format (such as is created by a Cobol program)? (2 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi experts
I want your help to change the file format to my wanted version, please give me a hand thanks
$cat file
install pass
make os pass
make build kernel failed
usb storage pass
chane to
| *install* | *make os* | *make build kernel* | *usb storage* |
| pass | pass... (7 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
8. Post Here to Contact Site Administrators and Moderators
Majority of the questions are pertaining file/string parsing w.r.t
sed
or
awk
It would be nice to have these two as their own sub category under shell-programming-scripting which can avoid lot of duplicate posts. (1 Reply)
Hi Experts,
I have a string with colon delimited, want 2nd colon to be changed to a pipe.
data:
101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:
I am trying with sed, but can change only 1 occurance:
echo "101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:" | sed 's/:/|/2'... (5 Replies)
Hi,
I have a lot of string texts which normally should only contain a single float so that I can put this float into a variable.
This stings are generated by a grep command out of a large html file.
sometimes a value that I want to grep is found more than once, so that the resulting sting... (1 Reply)
Discussion started by: Stefan Willms
1 Replies
LEARN ABOUT REDHAT
rpdump
rpdump(1) General Commands Manual rpdump(1)NAME
rpdump - pine remote data utility
SYNTAX
rpdump [ -f ] -l Local_file -r Remote_folder
DESCRIPTION
Rpdump may be used to copy the actual data from remote Pine configuration files or address books into a local file. It is intended to be
used by system administrators. Regular users should normally use the facilities provided within Pine.
Local_file will normally be a local temporary file. Remote_folder is the IMAP folder being used as a remote Pine configuration (with the
help of Pine's -P, -p, and -x commands or PINECONF, PINERC, and PINERCEX environment variables) or remote Pine address book folder. A copy
of the data from Remote_folder will be copied to Local_file.
-f Force the dump even if the remote folder is in an unrecognized format.
-l Local_file The file on this system that is to be copied to.
-r Remote_folder A remote folder name to be copied from. See the Pine documentation for the syntax of a remote folder name. One exam-
ple is
{my.imap.server}remote_pinerc.
DIAGNOSTICS
Exit status is zero if all goes well, -1 otherwise.
SEE ALSO Rpload(1).
Copyright 1989-2001 by the University of Washington. Pine and Pico are trademarks of the University of Washington.
$Date: 2001/10/01 19:24:03 $
rpdump(1)