10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I got a question. I have several csv files with lots of data in it and for the first column i have EAN codes.
The problem that i am facing is that some of these codes have the leading 0 removed so they are 12 or less chars while a EAN code is (always?) 13 chars.
For this i used a... (9 Replies)
Discussion started by: SDohmen
9 Replies
2. Shell Programming and Scripting
Hello Friends,
I would appreciate so much if you could explain how the underscores works at the following code? Sorry if it sounds a bit novice question.
awk -F',' 'NR==FNR{_=1;next}!_{print}' exclude infile
KR,
Eagle (6 Replies)
Discussion started by: EAGL€
6 Replies
3. Shell Programming and Scripting
Hello there,
I am new to the awk scripting and getting the following error while running the script. Please can you advise me how to resolve this . Thanks
./sub_del_awk_lat.sh
awk: cmd. line:5: warning: escape sequence `\/' treated as plain `/'
awk: cmd. line:5: sed -n... (6 Replies)
Discussion started by: Sudhakar333
6 Replies
4. UNIX for Dummies Questions & Answers
I need to write script in AWK, changing first char from a line from lower to upper.
I found function toupper etc. but have no idea how to sent only first char from every line instead of the whole line. Anyone has any idea?
//
Sorry for my english:D (8 Replies)
Discussion started by: bbqtoss
8 Replies
5. Programming
Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially):
xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’:
xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’
The same error with all c++ constructors - gcc 4.4.4.
If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies
6. Shell Programming and Scripting
Hi everyone,
suppose that I have the following line:
#test your knowledge
can I use AWK to print the word "test" only? without the #?
what should I change to this:
awk '{print $1}'
thanks in advance guys (2 Replies)
Discussion started by: Abdulelah
2 Replies
7. Shell Programming and Scripting
Hello,
I need an awk script to receive a variable that's an decimal value such as 009 or 031 and then convert this value to an ascii character to use as the FS (field separator for the input file).
For example,
009 should be converted to an ascii tab
031 should be converted to an ascii... (1 Reply)
Discussion started by: script_op2a
1 Replies
8. Programming
Hello,
I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it:
char* getext(char *file)
{
char *extension;
int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies
9. Shell Programming and Scripting
I created a file contains:
create table .....;
create index ....;
create trigger...;
and I want to substitue from my file ; by ;-- from the line where appears create trigger to the end of the file and keep intact the create table step and index in the file.
awk '/CREATE... (2 Replies)
Discussion started by: mario dionne
2 Replies
10. Shell Programming and Scripting
I'm facing a problem when trying to read a file and convert the content from char to decimal in ASCII. :confused:
eg :-
Input file :
20051231 8.00
experted result :
50484853495051493256464848
The content of input file is vary very day.
I need to use AWK script to program it.
Pls... (4 Replies)
Discussion started by: jasmine05
4 Replies