12 tags on


  • All Sites

1 answer

Randomizing order of what appears in the second and third columns

If I have a text file in the following format, where the field separator is , and the text delimiter is ' This is how it looks if opened in a text editor such as gedit 'not','here and ...

1 answers | 5 mins ago by Nolohice on Stack Overflow
0 answers

Terminal or Konsole?

I am using Ubuntu 14.10 with KDE graphical environment. KDE has Konsole as terminal emulator. Now I have Terminal and Konsole both on my Ubuntu. My question is which one should I use to run command? ...

2 answers

ext3/ext4 physical block size view

I'm using a suse 11 server with xfs and using "xfs_info /srv" command i seen this. xfs_info /srv/ meta-data=/dev/mapper/vg01-srvvol isize=256 agcount=38, agsize=1964032 blks = ...

0 answers

getops still performs default actions when arguments are provided

I've recently started working with the getopts command in bash. I am confused as to why my script runs the dafult action "cat ~bin/Temp/log.txt | ~bin/Scripts/" when arguments have been ...

0 answers

ZFS on Linux “no such device in pool”

I have a pool which contains a disc with only a few errors. I wanted to clear those errors out and see if they came back before I purchased a new disc: me@server:/$ sudo zpool status tank pool: ...

0 answers

grep file index and unique pattern from a file to an array or list in python

New to the programing. I have ~10K files in a directory. Names like test1.dat test2.dat etc.. In test'x'.dat files, I have a unique pattern ( Certain Value = YY.00). Most of the files do have this ...

0 answers

Changing Background Image in Multiple Terminals

I was wondering if anyone would know how to change the background image in the terminal in a unique way. I know how to change it so that every instance of the terminal has the same background, but I ...

0 answers

passing db name as parameter in “use dbname” mongodb

I am writing a shell script, where in I need to use the statemetn "use dbName" to connect to various dbs. Is there any way to add it as parameter e.g.,/ mongo localhost/admin--eval " use ...

1 answer

modifying the linkage path of an executable

The ldd utility shows which shared object files a binary executable depends on, and also shows the path of that binary executable on the file system. Is it possible to modify this path, on an ...

1 answers | 27 mins ago by Siler on Stack Overflow
0 answers

Shell Script time control

I am running a shell script which runs for ONCE or twice a week.. and this program runs for few hours (depends on how many files) a day.. But problem is, I have to pause this program during the ...

0 answers

ifconfig en1 without any wired adapter present

ifconfig en0 shows active: it is my wireless adapter that I'm using currently. ifconfig en1 shows inactive: but I'm wondering why en1 is even an option for me considering that I don't even have a ...

5 answers

Bash read/write file descriptors — seek to start of file

I tried to use the read/write file descriptor in bash so that I could delete the file that the file descriptor referred to afterward, as such: F=$(mktemp) exec 3<> "$F" rm -f "$F" echo "Hello ...

1 answer

How can I redirect what is shown on Terminal to a file, when using the 'less' command?

How do I redirect the Terminal content (the content that currently I'm looking not the entire file, when using the less command) into a outfile until I press the Q to exit from less?

1 answers | 49 mins ago by KasiyA on Ask Ubuntu
0 answers

Capitalize first lower-case letter in specific location

I have a lot of .htm files. Title tag has something similar 19.10.2014 - pila and it's always different text. How it is possible to make pila to Pila. What i need is a onliner which finds all .htm ...

1 hour ago by Jaur on Stack Overflow
1 answer

Filesystem Hook for .doc open C#

I'm writing an application that needs to be notified of every doc file that is opened, I've tried using the FileSystemWatcher but it seems that these days NotifyFilter.LastAccess is disabled due to a ...

1 answers | 1 hour ago by Mrk Fldig on Stack Overflow
1 answer

awk: How can I use awk to determine if lines in one file of my choosing (lines 8-12, for example) are also present anywhere in another file

I have two files, baseline.txt and result.txt. I need to be able to find if lines in baseline.txt are also in results.txt. For example, if lines 8-12, is in results.txt. I need to use awk. Thanks.

1 answers | 1 hour ago by user2719735 on Stack Overflow
0 answers

Unix - How to check if firewall is blocking mailx functionality?

I am attempting to write a script that utilizes the mailx command. The script is supposed to send files as attachments to a SharePoint directory. I use the following command to encode and send the ...

1 answer

How to determine the amount of space that comes free when running rm -rf

Here is a nice system-administrator problem I ran into today, perhaps somebody here knows a solution. The problem is quite simple: I want to know, beforehand, how much disk space is freed when ...

2 answers

How to Sum a column in AWK?

My file is delimited by a comma which gives 64 columns. I extracted the field as shown below: awk '{split($0,a,","); print a[57]}' How can I compute the sum of the values in columns 57 with my ...

2 answers | 1 hour ago by Ajo on Stack Overflow
0 answers

Python Communicate/Wait with a shell subprocess

Tried searching for the solution to this problem but due to there being a command Shell=True (don't think that is related to what I'm doing but I could well be wrong) it get's lots of hits that aren't ...

3 answers

How to add a function to .bash_profile/.profile/bashrc in shell?

I have a function which converts epoch time to date. Here is the definition date1(){ date -d @$1 } I'd like to be able to write: $ date1 xxxyyy Where xxxyyy is the parameter I pass into my ...

3 answers | 2 hours ago by Dude on Unix & Linux
2 answers

I can't get Graal Online to work

I checked, and my computer is 64bit. The file i downloaded is 64bit. I've tried the following things -> uname -m ./Graal ls cd Downloads/ ls ./Graal sudo apt-get install ...

2 answers | 2 hours ago by Harv on Ask Ubuntu
2 answers

How I can set-up LXTerminal in Lubuntu to start maximized?

When I push CTRL + ALT + T I want see my default LXTerminal in Lubuntu 13.04 in full size (not like F11). I know that I can push CTRL + ALT + F1 and get tty-terminal - it good for some situations, but ...

2 answers

grep 2 words at if statements in Bash

I am trying to see if my nohup file contains the words that I am looking for. If it does, then I need to put that into tmp file. So I am currently using: if grep -q "Started|missing" ...

2 answers | 2 hours ago by Young on Stack Overflow
7 answers

How to count char's number?

For example I have file 1.txt, that contain: Moscow Astana Tokyo Ottawa I want to count number of all char as: a - 4, b - 0, c - 1, ... z - 0

3 answers

Execute command multiple times with curly brackets arguments list

When I needed to run a command multiple times with a different argument I used this approach (without understanding it fully): touch {a,b,c} Which is equivalent of: touch a touch b touch c I ...

0 answers

Trying to run an Rscript from the command line but I'm running into namespace errors

I'm fairly new to Linux and I'm running into some major problems. I'm trying to run an Rscript from the command line instead of RStudio on amazon EC2 ubuntu instance. My script makes use of couple of ...

0 answers

How to make Konsole invoke konsole -ls for all users?

I admin a linux domain for students. The students use their lab workstations in graphical mode, but often use Konsole on KDE for ssh and programming tasks. I know Konsole can be configured through ...

1 answer

Grep for a word within two inverted commas

How to grep for a word within two inverted commas. The word may contain any number of characters . e.g "two" , "three"

1 answers | 2 hours ago by Zama Ques on Unix & Linux
2 answers

Compiling Python with curses support

My attempts to compile and install Python with curses support have failed and I've tried various iterations on my compile flags and whatnot, and can't seem to get this thing working. This is on ...

15 30 50 per page
1 2 3