8 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for nikita.

Hi, i want to delete a column from a file. the file is like : 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 if i want to remove any column the outout should be like ( suppose 4): 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 i have used swk command, but its not …

Member Avatar for Liam Huang
0
2K
Member Avatar for William_6

hello, I created a awk program to work witha data file to output a table and subtotal the rows and total up the collums and average I got it to work but when i added a presentation header before my totals go away. working code so far ------ can be …

Member Avatar for William_6
0
225
Member Avatar for iamthesgt

For a shell script used to automatically generate c++ code files, I have to split certain names apart for them to be formatted. I split them at a capital letter, but I do not want to split if there are multiple capital letters in sequence. For example: I want this …

Member Avatar for iamthesgt
0
2K
Member Avatar for iamthesgt

I am using Awk inside a bash shell script to search header files for c++ functions so I can add these functions to another file. All of the functions I need will have form: type getName() or type setName(type value) Right now I get all the functions listed in between …

Member Avatar for iamthesgt
0
447
Member Avatar for nikita.

CONFIG_FILE="${HOME}/sample/seq.cfg" count=`awk 'END {print NR}' $CONFIG_FILE` echo $count t=1 while [ "$t" -le "$count" ] do output_var=`awk -v v1=$t '$1 ~ /v1/ { print $1 }' $CONFIG_FILE` input_var=`awk -v v1=$t '$1 ~ /v1/ { print $3 }' $CONFIG_FILE` echo "O=" $output_var echo "I=" $input_var done the above code is giving …

Member Avatar for nikita.
0
247
Member Avatar for winky

Been a long time since I've logged in and had a question, but here goes nothing! I have a file that is not delimited in any way, but I need to replace a particular column character from a space to a alphanumeric value on every other line starting at line …

Member Avatar for winky
0
458
Member Avatar for msrikanth

Hi Everyone, I need a replace a string (ex : this) with the string (ex : that) in each line of a file (sample.txt) using a C Shell Script and I am not allowed to use sed,awk and replace command in the unix , So i tried to use tr …

Member Avatar for histrungalot
0
7K
Member Avatar for kristo5747

After running the command [CODE] find . -name "R*VER" -mtime +1 -exec sh -c 'grep -H ^err "{}" || echo "{}:No error"' \;[/CODE] my files look like this [CODE] RRR1~COS~COSMETICS~40048~jgmdtv113~1~P~R22-200~029053662549~20110607~102151.VER No error RRR1~COS~COSMETICS~ETT03~jgm14652.~3~F~R16-500~000907009757~20110607~085109.VER err 3922 [/CODE] Using the tilde (~) symbol as delimiter in the file name, can I extract …

Member Avatar for kristo5747
0
207

The End.