10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
How awk 'll help to do this file contains bunch of insert statement like below remove fourth column from all statement put it in new file
INSERT INTO `tbl_medicalquestions` VALUES (1,'Is anyone waiting for an operation, post operative check up, any other hospital treatment or... (12 Replies)
Discussion started by: ashutoshverma
12 Replies
2. Shell Programming and Scripting
How Can we delete a range of coloumns using awk? (or any other method is fine)
If we have a file which has about 200 coloumns.
I need to delete a particular range lets say for eg from $6 to $119
Can we do this using cut, if yes the cut command would also be helpful.
many thanks in... (4 Replies)
Discussion started by: Sri3001
4 Replies
3. Solaris
I am in a prison system with a standalone (no internet connection) Solaris 8 network using Sun-Rays for clients (so no software is on the client side). We are finding a problem where inmates are using the print-to-file function to be able to rename folders everywhere on the server, meaning they are... (1 Reply)
Discussion started by: ixeye
1 Replies
4. Shell Programming and Scripting
Hallo,
i have a file which looks like this:
$1 $2 $3
Student1 55 Pass
55 Pass
35 Fail
Student2 55 Pass
55 Pass
35 Fail
i want that the $1 field... (3 Replies)
Discussion started by: saint2006
3 Replies
5. Shell Programming and Scripting
key pair is 1st and 6th column ex:a20 : p10 or a20 : p11
For every key pair if the vlaue(4th column) is the same then delete all the lines who has keypair and the value
ex: a20 : p10 has value 1 only then delete those but a20 : p11 has different values 1,2 and 3 and keep those.
input
a20 ... (8 Replies)
Discussion started by: ruby_sgp
8 Replies
6. Shell Programming and Scripting
Hi All,
I have about 10000 files having names of the same pattern
I am using awk to match the pattern.
Inside the awk block how can i delete all the 10000 files..
Or is there any other way to delete files in bulk...
"rm" command fails with the message that argument list is... (9 Replies)
Discussion started by: abhinav192
9 Replies
7. Shell Programming and Scripting
I have a file whose format is like the following
350,2,16.2,195,2,8.0
every 3rd column of this file should be deleted. How can i achieve this
tried with the following
iostat -D -l 2 | /usr/xpg4/bin/awk ' NR>2 { for (i=0;i<=NF;i++)if(i%3==0)$i=""};'
but no luck (3 Replies)
Discussion started by: achak01
3 Replies
8. Shell Programming and Scripting
i have a file and i want to print the second variable and add qoutes to it
i do
awk -F"|" '{print $2}' star.unl.
i get the output xxxxxxx
but i need the variable($2) to be in quotes.like
"xxxxxxx"
how do i do there please (3 Replies)
Discussion started by: tomjones
3 Replies
9. Shell Programming and Scripting
Hi all....I'm using awk to validate a csv file, but now I've been told to delete any invalid lines from the file.. Im not sure what the best way to do this is?
Would it be to create a temp file say "csv_temp.tmp" file and print all the valid records to that temp file. Then delete the old file... (3 Replies)
Discussion started by: satnamx
3 Replies
10. Shell Programming and Scripting
Hello,
I am trying to write a formatted report into a file using .ksh script and awk. Here is the command I am trying to run
echo "before awk" ${SRC_SCHEMA}
echo | awk '{printf "%-20s", ${SRC_SCHEMA} }' >>$REPORT_SQL_NAME
I get the following error
before awk ADW
awk: 0602-562 Field $()... (1 Reply)
Discussion started by: fastgoon
1 Replies