Search Results

Search: Posts Made By: Vryali
11,404
Posted By RudiC
You could also use sed to insert a column...
You could also use sed to insert a column separator (comma in this case) and then use sort of your first awk cmd:sed 's/ */&,/g' test| awk -vC0='\033[0;0m' -vC1='\033[1;35m' '
{ if (NR == 1)...
6,170
Posted By locoroco
[Solved] awk string with spaces
Why does this work:

awk -v s="this is a string" 'index($0, s)' file
while the following doesn't?

s="this is a string"
awk -v s=$s 'index($0, s)' file
How do I search for a string with spaces...
2,581
Posted By Don Cragun
I no longer have ready access to a Solaris...
I no longer have ready access to a Solaris system, but:
sed 's/\([0-9][A-Z]\)\{1,3\}/X/g'
is using standard Basic Regular Expression notation. If /usr/bin/sed doesn't work, you might try...
2,581
Posted By Don Cragun
I think he's looking for 1, 2, or 3 occurrence of...
I think he's looking for 1, 2, or 3 occurrence of a digit followed by an uppercase letter:
echo "This is a test 0A2B9C 0A 3B4C" | sed 's/\([0-9][A-Z]\)\{1,3\}/X/g'
1,618
Posted By hipe
For removing characters tr -d '$' < orig.csv >...
For removing characters tr -d '$' < orig.csv > corrected.csv is more straightforward.
Forum: What is on Your Mind? 07-24-2012
1,595
Posted By zaxxon
Good point, moving it.
Good point, moving it.
Forum: What is on Your Mind? 07-24-2012
1,595
Posted By alister
It probably should have been posted in the...
It probably should have been posted in the Lounge.

Regards,
Alister
5,518
Posted By Corona688
Whenever you have sed | awk | grep | kitchen |...
Whenever you have sed | awk | grep | kitchen | sink, it can probably be done all in one awk. It's a lot more than a glorified 'cut'.

1) Search for a line containing CYTOCHROME C where there's two...
12,665
Posted By jacobs.smith
wget output file names
Hi,

I have a list of urls in my input.txt file like this

input.txt

http://unix.com/index.html?acc=OSR765454&file=filename1.gz
http://unix.com/index.html?acc=OBR765454&file=filename111.gz...
7,162
Posted By alister
If your real data is, like your sample data,...
If your real data is, like your sample data, sorted on the first field (the join field):

join f1 f2 > f12
join f1 f3 > f13
join f2 f3 > f23
join f12 f3 > f123


Running join that many times...
1,488
Posted By elixir_sinari
sed '2s/\(.*\)/ThisGoesOnLine2\ \1/' test.file ...
sed '2s/\(.*\)/ThisGoesOnLine2\
\1/' test.file

Or

sed '2i\
ThisGoesOnLine2' test.file

Or

sed '1a\
ThisGoesOnLine2' test.file
1,094
Posted By alister
The problem is that you aren't setting the value...
The problem is that you aren't setting the value of FS until _after_ the first record has already been read and split. That first line is being split on whitespace. Since there is none, $3 is empty....
2,091
Posted By Corona688
You don't need if-else for this. The 'ignore'...
You don't need if-else for this. The 'ignore' happens by default anyway, you don't need a case for that.

You can put a condition in front of a code block which will cause it to be executed only...
6,025
Posted By gary_w
This works. Note Rule_Severity is null to test: ...
This works. Note Rule_Severity is null to test:
$ cat x
#!/bin/sh

Group_ID='V-4269-1'
Group_Title='Unnecessary Accounts, Games.'
Rule_ID='SV-4269-lr4_rule'
Rule_Severity=""...
6,339
Posted By agama
Glad it worked. The line you asked about can be...
Glad it worked. The line you asked about can be confusing.

The variable 'c' is assigned a command and as a result the construct c | getline basically causes awk to execute a popen() call (pipe...
6,339
Posted By agama
Can you not just pipe it through your perl...
Can you not just pipe it through your perl programme on the way to the output file? Using awk (I don't do perl) it'd be something like this:


${DSMPath} -id=${TivUser} -password=${TivPassword}...
6,339
Posted By birei
Hi Vryali, Try this way. Substitute tail -f...
Hi Vryali,

Try this way. Substitute tail -f $ARGV[1] with your TSM command and the script will write output to first parameter file in command line with date inserted at the beginning of each...
1,347
Posted By edehont
Ftp uses ASCII-transfer mode by default. A zipped...
Ftp uses ASCII-transfer mode by default. A zipped tar is binary.
Issue the command 'binary' to tell ftp to treat your upload as such.
1,079
Posted By Scrutinizer
Try case: case $MONTH in 1|4|7|10)...
Try case:
case $MONTH in
1|4|7|10) do_something ;;
*) do a different thing
esac
Showing results 1 to 19 of 19

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