Hi all,
I have a field in the line, let's say argument $6, which is in the format 00.00
If i want to split the field to get rid of the "." in between of the amount, how can i do that i awk script?
I have it like this
split($6,a,".")
but it will get rid of the last 2 digits after the... (4 Replies)
Hi all,
im newbie in unix, i have a case like this
file name : RegisterSubscriber.log
file value :
<errId>0x0509000000000003</errId><HARs><ok/><affectEntity>510890905290059</affectEntity></HLRes></HRI>
I want to grep the line which contain 0x0509000000000003,
and i want to grep... (2 Replies)
Is there a way I could use different a different field seperator for different parts of the body?
kinda like
{FS = ":"}
FILENAME == "products"{
price = $3
if(numprods < $1-100)
numprods = $1-100
}
{FS = "/"}{}
FILENAME == "associates"{
associateid... (5 Replies)
Hi Experts,
I have a Input.txt document which contains data fields seperated by tabs. There are 4 fields totally Named UNIQUE, ORDER, CONTACT and WINS. The UNIQUE field contains unique ID and the CONTACT field contains data seperated by comma in some records. I am looking to write an awk script... (12 Replies)
Hello everybody:
I want to replace any field $2 of any file line (f.i. test.txt) matching $1 with a shell variable.
$ cat test.txt
F 0
B A
H -12.33
Now I'm going to ask the value of variable B:
$ SEARCHVAR=B
$ OLDVAL=$(awk -v SEARCHVAR="$SEARCHVAR"... (4 Replies)
Hello,
I am trying to write a shell script that maintains the health of the passwd file. The goal is to check for duplicate usernames, UID's etc. I am able to find and sort out the UID and login names via awk (which I would like to use), but I can't figure out how to save the record field into a... (1 Reply)
Hi All,
I need to get rid of initial meta key from json files with enclosed parenthesis from start and end of the lines which has total 4000 lines.
here is the sample Json records :
{"start": true, "meta": {"name": "xyz", "creation": "2017-07-14T16:20:06.000+02:00"}}
I need to remove... (7 Replies)
Hello guys,
I want to parse a JSON file in order to get the data in a table form.
My JSON file is like this:
{
"document":{
"page":
},
{
"column":
}
]
},
{
... (6 Replies)
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Hi All,
I am new to shell scripting, Need your help in creating a shell script which converts any unix command output to JSON format output.
example:
sample df -h command ouput :
Filesystem size used avail capacity Mounted
/dev/dsk/c1t0d0s0 8.1G 4.0G 4.0G 50% /... (13 Replies)
Discussion started by: balu1234
13 Replies
LEARN ABOUT DEBIAN
shtool-arx
SHTOOL-ARX.TMP(1) GNU Portable Shell Tool SHTOOL-ARX.TMP(1)NAME
shtool-arx - GNU shtool ar(1) extensional command
SYNOPSIS
shtool arx [-t|--trace] [-C|--command cmd] op archive file [file ...]
DESCRIPTION
shtool arx is a wrapper around the archiving tool ar(1). It provides the ability to create archives out of existing archives, i.e., if one
of file matches ""*.a"", the archive member files of file are used instead of file itself.
The trick of this command is the automatic handling of archive members which is especially interesting if one wants to construct a (usually
top-level) library archive out of pre-built sub-library archives (usually staying inside subdirs) in a large source tree. For GNU libtool
based projects, a similar functionality is provided by GNU libtool internally, too.
OPTIONS
The following command line options are available.
-t, --trace
Shows the actually involved shell commands.
-C, --command cmd
Set the used ar(1) command to cmd instead of just "ar" (searched in $PATH).
EXAMPLE
# Makefile
AR=ar
RANLIB=ranlib
:
OBJS=foo.o bar.o
LIBS=baz/libbaz.a quux/libquux.a
:
libfoo.a: $(OBJS) $(LIBS)
shtool arx -C $(AR) rc libfoo.a $(OBJS) $(LIBS)
$(RANLIB) libfoo.a
HISTORY
The GNU shtool arx command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1999 for GNU shtool. It was prompted by
need to build libraries out of sub-libraries inside the OSSP project.
SEE ALSO shtool(1), ar(1).
18-Jul-2008 shtool 2.0.8 SHTOOL-ARX.TMP(1)