10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script that will print column 4 ("25") when column 1 contains "123". However, I need to ignore the alpha characters that are contained in the input file. If I were to ignore the characters my output would be column 3.
What is the best way to print my column of interest... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
2. Shell Programming and Scripting
Input:
ak=70&cat15481=lot=6991901">Kaschau (1820-1840)
ak=7078&cat15482=lot=70121">Principauté (1940-1993)
ak=709&cat=lot15484=70183944">Arubas (4543-5043)Output:
70 15481 6991901
7078 15482 70121
709 15484 70183944 (11 Replies)
Discussion started by: sdf
11 Replies
3. Shell Programming and Scripting
Hi,
i want to use awk to print the first 6 characters of a variable
awk -F"|" '$3>0 { print $3 }' z00.unl > z001.unl
but $3= 7 digits
and i just want to print the first 6 digits.
eg 1005779 but i want to print only 100577 (3 Replies)
Discussion started by: dealerso
3 Replies
4. Shell Programming and Scripting
I'm using awk '{print $1}' and it works most of the time to print the contents of a mysql query loop, but occationally I get a field with some special character in it, is there a way to tell awk to ignore all special characters between my FS? I have >186K records, so building a list of ALL special... (6 Replies)
Discussion started by: unclecameron
6 Replies
5. Shell Programming and Scripting
I have a txt file as follows
Code:
Oct 1 file1 4144
Oct 1 file23 5170
Oct 2 file5 3434
Oct 21 file56 2343
I need to add a new column by marking the right log file from current directory. For example populate like this. Please not in the second columt for "1" it has... (2 Replies)
Discussion started by: gubbu
2 Replies
6. Shell Programming and Scripting
Hello everyone:
I have ran into this a few times now where my skills are just not up to snuff when it comes to Unix. So, I came here to find some beard stroking Unix wizard to help me.
Basically, I am using OS X 10.5 in large scale at work and sometimes I have to run some custom reports. ... (5 Replies)
Discussion started by: tlarkin
5 Replies
7. Shell Programming and Scripting
Hi,
I have the following example string:
today_is_a_good_day.txt
The character "_" inside the string can sometimes be more or less. The solution for every string equal the count of "_" should be alway the rest after the last underline character.
Result: day.txt
I want to use awk... (5 Replies)
Discussion started by: climber
5 Replies
8. Shell Programming and Scripting
Hi,
I have a variable read from user input:
PROFILESROOTDIR="\\194.185.82.188\CMSRepository\EncodingProfiles"
awk -F"=" -v gr=$PROFILESROOTDIR '/ProfilesRootDirectoryFromXOEMachine/{$2=gr;}1' OFS="=" $CFGFILE > "${CFGFILE}_new"
For this awk to work properly I need to replace in the... (7 Replies)
Discussion started by: potro
7 Replies
9. Solaris
G'day guys,
Just a simple question:
Is it possible to set user's passwords without numeric characters?
I prefer to have passwords as simple words, but when going through SMC, i get an error that the first six characters must contain at least 2 alphabetic and 1 numeric.
Server is a Sun... (3 Replies)
Discussion started by: drchris
3 Replies
10. Shell Programming and Scripting
i have this script that searches for a pattern.
However it fails if the pattern includes some
special characters. So far, it fails with the
following strings:
1. -Cr
2. $Mj
3. H'412
would a sed or awk be more effective?
i don't want the users to put the (\)
during the search (they... (5 Replies)
Discussion started by: apalex
5 Replies