Hi All,
I have a file, say test.dat which is "|" separated. It has 50K records in it. One of the field in the file has the data in the format 'mm/dd/yyyy'. I need to edit the file by changing the format to 'yyyy/mm/dd' in the same field where as the rest of the data remain untouched. Please... (2 Replies)
I have input file that is having below text
098769
178902
234678
I want to modify the input file like below.
'098769',
'178902',
'234678'
Can you please help to get this. I tried but i am not getting this. (3 Replies)
For lists in sed, to say what to replace, is this correct:
I am hoping that this would recognise that either a "." is present, or that the substitution happens at the end of the line.
For files with extensions , my script works perfectly.
My problem is, files without extentions, i.e. . ... (1 Reply)
Hi all,
Pls help me with file editing using awk.
I have a text file with the below format.
"STANDARD VOLUME ","2009","BUX","V","JCBH49","NF", 001413
"VENDOR MATERIAL-STD ","2009","BUX","V","JCBH49","NF", 009948
"INBOUND TRANS-STD ... (2 Replies)
1. The problem statement, all variables and given/known data:
Problem Statement for project:
When an account is created on the CS Unix network, a
public html directory is created in the account's home directory. A default web page is put into that directory.
Some users replace or... (13 Replies)
Hi all,
I have a conf file, i want to update some entries in that conf file. Below is the code for that using a temporary file.
sed '/workgroup=/ c\workgroup=Workgroup' /usr/local/netx.conf > /usr/local/netx.conf.tmp
mv -f /usr/local/netx.conf.tmp /usr/local/netx.conf
Sample contents of... (9 Replies)
Hi all
I use aix (sadly).
I've got a file consisting of fields separated by commas, I need a sed or awk command that will delete all spaces between two commas as long as there are only spaces between the commas.
eg
,abc, ,sd , ,dr at
would become
,abc,,sd ,,dr at
I have... (53 Replies)
Hello,
i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG:
please help a newbie. below is my code:
WorkingDir=$1
FileName=`cut -d ',' -f... (2 Replies)
HI All,
I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help?
This file contain 100 lines. There are one line for example:
2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
value of i = solarisbox
ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
2 Replies
LEARN ABOUT SUSE
xmlstarlet
XMLSTARLET(1) xmlstarlet Manual XMLSTARLET(1)NAME
xmlstarlet - command line XML/XSLT toolkit
SYNOPSIS
xmlstarlet [<options>] [<command>] [<cmd-options>]
INTRODUCTION
XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files us-
ing simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.
This set of command line utilities can be used by those who deal with many XML documents on UNIX shell command prompt as well as for auto-
mated XML processing with shell scripts.
OPTIONS --version
Display the version of xmlstarlet.
--help Display help.
COMMANDS
Type: xml <command> --help <ENTER> for command help
Available commands include:
ed (or edit)
Edit/update XML document(s).
sel (or select)
Select data or query XML document(s) (XPATH, etc).
tr (or transform)
Transform XML documents(s) using XSLT.
val (or validate)
Validate XML document(s) (well-formed/DTD/XSD/RelaxNG).
fo (or format)
Format XML document(s).
el (or elements)
Display element structure of XML document.
c14n (or canonic)
XML canonicalization.
ls (or list)
List directory as XML.
esc (or escape)
Escape special XML characters.
unesc (or unescape)
Unescape special XML characters.
pyx (or xmln)
Convert XML into PYX format (based on ESIS - ISO 8879).
p2x (or depyx)
Convert PYX into XML.
REFERENCES
XMLStarlet is a command line toolkit to query/edit/check/transform XML documents (for more information see http://xmlstar.source-
forge.net/).
AUTHOR
Mikhail Grushinskiy.
XMLSTARLET(1)