Need to create a list for yad (zenity) from directory listings:
dir-a contains files 1,2,3,4,5,6
dir-b contains files a,b,c,d,e,f
Final list (in a variable) needs to read:
"1" "a" "2" "b" "3" "c" "4" "d" "5" "e" "6" "f"
( For simplicity I will always ensure that &q
Hello to all,
I hope some awk guru could help me.
I have 2 input files:
File1: Is the complete database
File2: Contains some numbers which I want to compare
File1:
Code:
"NUMBERKEY","SERVICENAME","PARAMETERNAME","PARAMETERVALUE","ALTERNATENUMBERKEY"
"889780014068134","REGULAR","PROFILE","7","3495
I want to used sed or some other linux command to convert special characters in XML files.
Here is an example:
-bash-3.2$ echo "P&G"
P&G
Now I want to change the "&" to "&" so I run:
-bash-3.2$ echo "P&G" | sed -e "s/&/&/ig"
P&G
I got the result I want, but if someone runs the conversion program again,
Hi All,
I need to create a script to process on 10 files.
I have a source file that contains multiple XML files concatenated in it. The separator string between files is <?xml version="1.0" encoding="utf-8"?>. I wanted to split files in multiple files with mentioned names. I had used a awk code earlier to spilt files in number of lines i.e.
Hi guys,i am trying to set up Vim as my C++ IDE since 2 days and no success so far.I have installed Vim pacman -Q vim
vim 7.3.661-1I have downloaded vim-latex and clang tar balls,extract and place appropriate directorys in ~/.vim e.g.
I can't find info on this anywhere, but I could swear that when I used to view hidden files in nautilus, what showed up were only the ".name" ones (this would have been back in 10.04). But now it also shows all the backup "name~" files as well.
Hello there,
I found an elegant solution to computing average values from multiple text files
Code:
awk '{for (i=1;i<=NF;i++){if ($i!~"n/a"){a[FNR""i]+=$i}else{b[FNR""i]++}}}END{for (i=1;i<=FNR;i++){for (j=1;j<=NF;j++){printf (a[i""j]/(3-b[i""j]))((b[i""j]>0)?"~"b[i""j]" ":" ")}
I have csv files that has 80-100 columns , I want to convert to sql script files.1st line is field name.
Code:
awk -F"," 'BEGIN{OFS=","} {print "INSERT INTO THEL(id,b,c) value("NR,$1,$2")"}'
How to make script that detect number of fields so i don't need to edit manually for each files.
thanks you