Tag Info

New answers tagged

0

In Linux you can use gawk command. I've done like this: echo "yyy = 80rr, xxx = 136rr, zzz = 95rr" | gawk '{ match($0, /.*= ([0-9]+).*= ([0-9]+).*= ([0-9]+)/, array); printf "%d %d %d\n",array[1], array[2], array[3]}'; The result was: 80 136 95 In your case: cat file.txt | gawk '{ match($0, /.*= ([0-9]+).*= ([0-9]+).*= ([0-9]+)/, array); ...


2

To append a line to a text file using a windows command line batch script you can use output redirection using the greater-than sign twice >>. For example echo "java installed" >> c:\log\logfile.txt Related: Append stdout to file from terminal? (OSX but also applies) Using command redirection operators (XP but mostly still applicable) ...


0

Assuming that your data is in column A, you can use the following formula to count the total of H: =COUNTIF(A:A,"H")


0

Does it have to be a PDF? You can open the first PDF in PS to flatten the text and save as JPEG for lower file size. I do this all the time to email proofs. If you still want it to be a PDF, you can place the flattened JPEG file back into InD (hide all other layers) and save as PDF again. Just be sure to Crop To: Trim Box if you have bleeds. Should be ...


0

You can't directly mark text in old chat window. But you can use next workaround to accomplish this: Using tab key go to the text block you want to mark Ctrl+c to copy it Using tab go to the window where you enter text Ctrl+v using arrow keys navigate to the begin or to the end of text you want to mark Press and hold shift Use arrow keys to mark the text ...


0

Assuming that you are currently using a GUI based browser (Chrome, IE etc.), you probably want to switch to using a keyboard based browser (such as Conkeror). To quote the web page: About Conkeror Conkeror is a keyboard-oriented, highly-customizable, highly-extensible web browser based on Mozilla XULRunner, written mainly in JavaScript, and ...


0

See this word cloud generator written in Python: https://github.com/amueller/word_cloud


0

The simplest way I can think of using unexpand and expand, depending on the system you're using, the following command(works in Arch Linux) may or may not work(this command in OS X and Arch Linux has different argument set. Refer your own man unexpand and man expand for detailed usage.), unexpand -t 4 --first-only [your_file] > [temp] expand -i -t 2 ...


1

The following one-liner: perl -ne '$_ =~ s|^(( )+)|" " x (length($1)/4)|eg; print $_' < test.txt Replaces 4-space indent with 2-space indents. (You can verify by replacing " " with "-+" to see the generated pattern) Now, we can create a bash file, let's call it indent-changer.sh: #!/bin/bash while read filename; do if ! [[ -r "$filename" ...



Top 50 recent answers are included