Search Results

Search: Posts Made By: cabrao
2,260
Posted By cabrao
$ awk '/^A.*.ZIP$/&&(/ANU/||/KJK/||/MAT/)' file ...
$ awk '/^A.*.ZIP$/&&(/ANU/||/KJK/||/MAT/)' file
A20120101.ANU.ZIP
A20120105.KJK.ZIP
A20120101.MAT.ZIP
1,827
Posted By cabrao
awk -Fcom '{print $1FS}' file
awk -Fcom '{print $1FS}' file
4,212
Posted By cabrao
Sure, here's an example. A file containing the...
Sure, here's an example.
A file containing the following ascii text:
axxx whatever xxxx ...
pxxx whatever xxxx ...
daxxx whatever xxxx ...
sxxx whatever xxxx ...
dbxxx whatever xxxx ...should...
4,212
Posted By cabrao
Sort by specific order?
Hello all

I was wondering if someone has an idea how to sort by a specific order, let's say by a specific alphabet containing only 4 letters like (d,s,a,p) instead of (a,b,c....z) ??

Cheers!
6,404
Posted By cabrao
$ echo Filename_Name_2012013001010101.txt | awk...
$ echo Filename_Name_2012013001010101.txt | awk '/^[0-9]/{print substr($1,1,8)}' RS='[_.]'
20120130
2,356
Posted By cabrao
I dont see where is the problem. With the...
I dont see where is the problem. With the previous sed example you should be able to adapt it to your needs..

$ ENBL_PX11_LIBSRC="pltsub.f xpltlib.f xbuplot.c"

$ echo $ENBL_PX11_LIBSRC | sed...
2,356
Posted By cabrao
$ cat file ENBL_PX11_LIBSRC = pltsub.f...
$ cat file
ENBL_PX11_LIBSRC = pltsub.f xpltlib.f xbuplot.c

$ sed 's/\.f/\.o/;s/\.c/\.o/' file
ENBL_PX11_LIBSRC = pltsub.o xpltlib.f xbuplot.o
1,366
Posted By cabrao
Sorry, I'm not really getting the purpose of your...
Sorry, I'm not really getting the purpose of your request?
Is it this what you want?
cd /home/data/test/run
mkdir -p ht/WEB/{HTML,JSP,CSS}
1,733
Posted By cabrao
awk one liner
The below code is a simple modified sample from a file with millions of lines containing hundreds of extra columns xxx="yyy" ...
<app addr="1.2.3.4" rem="1000" type="aaa" srv="server1" usr="user1"/>...
4,037
Posted By cabrao
There was a typo in my previous comment, you need...
There was a typo in my previous comment, you need to add option -n (for numeric sort)

Cheers ;)
4,037
Posted By cabrao
have you tried sort -nk2,2 ?
have you tried sort -nk2,2 ?
1,195
Posted By cabrao
Have you tried something like: ssh user@server...
Have you tried something like:
ssh user@server "cd path; for i in *; do echo \$i; done"
5,408
Posted By cabrao
$ paste file1 file2 A B 1,2 C D 3,4 ...
$ paste file1 file2
A B 1,2
C D 3,4
E F 5,6
1,667
Posted By cabrao
You can start from here... ...
You can start from here...
https://www.unix.com/shell-programming-scripting/104953-remove-duplicate-words-line.html
3,864
Posted By cabrao
$ awk -F'[- ]' '{print $1, $3}' a ID_090 2 ...
$ awk -F'[- ]' '{print $1, $3}' a
ID_090 2
ID_3787 4
ID_0098 1
ID_12 4
2,535
Posted By cabrao
Add ORS=, to your own command
Add ORS=, to your own command
15,338
Posted By cabrao
Hello, In your case I would use rsync with...
Hello,

In your case I would use rsync with --ignore-existing option.

Hope it helps you ;)
6,941
Posted By cabrao
Why everyone allways try to reinvent the wheel :)...
Why everyone allways try to reinvent the wheel :)

Why dont you use something like this:
http://caspian.dotconf.net/menu/Software/SendEmail/

Hope it helps you ;)
2,561
Posted By cabrao
processing xml with awk
With the following input sample extracted from a xml file
<rel ver="123">
<mod name="on">
<node env="ac" env="1">
...
1,235
Posted By cabrao
awk help
With the following sample extracted from a xml file:

<JOB_U client="1" name="job1" system="sys">
<XHEADER state="1">
<Title>test1</Title>
<Created>&lt;unknown/unknown&gt;</Created>...
3,111
Posted By cabrao
$ awk -vM="master>" 'NR==1{print...
$ awk -vM="master>" 'NR==1{print "<"M}{print}END{print "</"M}' child1.xml child2.xml
5,929
Posted By cabrao
$ awk 'ORS=!/\|TIER[0-9]*$/?FS:RS' infile | sed...
$ awk 'ORS=!/\|TIER[0-9]*$/?FS:RS' infile | sed 's/\"//g;s/ //g'
TESTID1|ACTIVE|Todd|Geller|Marketing Dir-Sales Model (IC)|TIER1
TESTID2|ACTIVE|Todd|Geller|Marketing Dir-Sales Model (MCA)|TIER2...
26,642
Posted By cabrao
I'm not sure if I understood your problem, but is...
I'm not sure if I understood your problem, but is it this what you're looking for?

awk -F, -vQ="'" '/^INSERT INTO/&&$8=$13=$18=Q"0000-0000 00:00:00"Q' OFS=, file
1,520
Posted By cabrao
$ awk -F: 'sub(FS $NF,z)' file Jun 13 12:59 ...
$ awk -F: 'sub(FS $NF,z)' file
Jun 13 12:59
Jun 13 13:02
Jun 13 13:14
4,248
Posted By cabrao
$ sub=`echo ${PROJECT_NAME}|cut -d "/"...
$ sub=`echo ${PROJECT_NAME}|cut -d "/" -f2`
Showing results 1 to 25 of 200

 
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy