Need advise/tip if there is more efficient way of doing this cut/paste/awk after changing a field
Hi,
This is the script currently and it is working as required. Just thought maybe there is a better or easier way of doing what I am trying to do.
Below is an excerpt of the file that I want to change. This is x.txt, the original file that I want to run this on is about 1000+ lines. Basically, these files are from several log files merged into one and I am wanting to change the USER=<username> field so that <username> is in lower case. I am working on the assumption that USERNAME=<username> is always field2.
Sample run of the script below:
I could simply do
but for 'clarity' I prefer to only change USER=<username> to USER=<lowercase_username> and leave the rest of the line as it is. I can't work out the awk or sed command options to use to achieve what I wanted, hence I ended up with a shell script instead. Maybe there is an awk one-liner that can do what I am trying to achieve
Hi,
Let's say that I have a file called table, I know that if I need to see a the second column for exampls I use:
awk ' {print $2}' table.txt
Is there anyway to use awk to actually cut a column and put it somewhere else in the table?:confused: (8 Replies)
Hi i need a favour
i have a file which has some trillions of records. The file is like this
11111000000000192831840914000000000000000000000000000
45789899090000000000000000011111111111111111111111111
I want to cut specific postions in each line like cut1-3 and assisgn it to a variable and... (5 Replies)
hi,
I have a file with content like this for an employee:
EmployeeID
101
Day_type, day
vacation,1/2/2009
sick day, 3/2/2009
personal day, 4/5/2009
jury duty day, 5/5/2009
how do I make the result to show:
EmployeeID,Day_type,day
101,vacation,1/2/2009
101,sick day,... (6 Replies)
Hello,
I had posted earlier about printing fields using AWK, but now I have a slightly different problem. I have text files in the format:
1*2,3,4,5
and wish to print the first, third, and fifth fields, including the asterisk and commas. In other words, after filtering it should look... (1 Reply)
Hi,
Need a help with shell script. I have to search for a string in one of the file, if match found, copy the line to a new file and delete the line from the exisiting file.
eg:
83510000000000063800000.1800000.1600000.1600000.2400000.1800000.2000000.21... (6 Replies)
Hi,
I've got a query regarding which of the following is more efficient & why -
cat <filename>|cut -d'*' -f2- > <newfilename>
or
cut -d'*' -f2- <filename> > <newfilename>
Thanks. (17 Replies)
I have a file which contains 3 fields separated by tabs example
andrew kid baker
I need to swap kid and baker using cut and paste commands how is this to be done?
Thanks (3 Replies)
i have file as with the below content
aaa.bbb.cc.dd
aaa.fff.bb
yyyyy.rrrrr.ggggg.iii
wwww.w.r.ty
i want the o/p as below
dd
bb
iii
ty
but i dont want to use awk. is there any other way to do this ? (5 Replies)
Discussion started by: anandgodse
5 Replies
LEARN ABOUT DEBIAN
exo-open
EXO-OPEN(1) Xfce Users Manual EXO-OPEN(1)NAME
exo-open - Open URLs and launch preferred applications
SYNOPSIS
exo-open [[url]...]
exo-open --launch [category] [[parameter]...]
DESCRIPTION
exo-open is a command line frontend to the Xfce Preferred Applications framework. It can either be used to open a list of urls with the
default URL handler or launch the preferred application for a certain category.
INVOCATION
exo-open either takes a list of URLs and tries to open each of them using the default handler, or, when using the --launch tries to launch
the preferred application for a certain category, optionally passing any number of parameters to the application.
Options
-?, --help
Print brief help and exit.
-v, --version
Print version information and exit.
--working-directory directory
When using the --launch option and this option is specified as well, the application will be run in the given directory. This is
primarily useful when running the preferred TerminalEmulator from another application and you want the command in the terminal window
to be run in a specific directory.
--launch category parameters...
Launch the preferred application for the given category with the optional parameters..., where category is either WebBrowser,
MailReader, TerminalEmulator or FileManager.
If you do not specify the --launch option, exo-open will open all specified URLs with their preferred URL handlers. Else, if you specify
the --launch option, you can select which preferred application you want to run, and pass additional parameters to the application (i.e.
for TerminalEmulator you can pass the command line that should be run in the terminal).
COMPOSING EMAILS
exo-open allows users and developers to open the preferred email composer from the command line by simply invoking exo-open
mailto:USER@HOST.TLD. This will open the composer window with USER@HOST.TLD as the recipient. This syntax is supported by all MailReaders.
In addition the MailReaders that ship as part of libexo also support extended mailto:-URIs (but be aware that user-defined mailers do not
necessarily support this), which allows you to also specify default values for the subject and the body of the mail, add additional
recipients (both Cc: and To:) and attach files to emails. For example mailto:foo@foo.org?cc=bar@bar.org&subject=Foo&attach=/foo/bar.txt
tells the composer to start an email to foo@foo.org and bar@bar.org with Foo in the subject and the file /foo/bar.txt attached to the
message.
AUTHOR
exo-open was written by Benedikt Meurer benny@xfce.org.
This manual page was provided by Benedikt Meurer benny@xfce.org.
Xfce 06/10/2011 EXO-OPEN(1)