12 tags on


  • All Sites

0 answers

How to set WinSCP default editor to Sublime Text on Ubuntu 14.10?

I know that to change the editor I go to Preferences -> Editors and select whatever I want, but how do I set it to Sublime Text 3 ? I'm supposed to write in the external editor the path to launcher of ...

3 answers

deleting concret data from csv

I have a long csv file with 5 columns. But 3 lines have 6 columns. One begin with "tomasluck", another "peterblack" and the last one "susanpeeters". I need to delete, in this 3 lines, the fourth ...

3 answers | 4 mins ago by Enric Agud Pique on Stack Overflow
1 answer

How to calculate previous 'n' months from an input parameter in Solaris?

I am writing a script on a Solaris system, and I need to get the nth previous month from an input parameter (e.g. I need the value of the 13th month previous to 201308 - so my output needs to be ...

3 answers

pipe in shell with redirection

My understanding is that a pipe in shell like a | b redirects b's stdin to a's stdout. However, I tried ls | less < somefile, the behavior is very strange. less shows the output of ls concatenated ...

3 answers | 13 mins ago by Yakumo Ran on Unix & Linux
4 answers

shell script to find a word in a list of files, all of them given as parameters

I need a simple shell program which has to do something like this: word_to_find file1 file2 file3 .... fileN which will display word_to_find 3 - if word_to_find appears in 3 files or ...

4 answers | 25 mins ago by danB on Stack Overflow
0 answers

cat into file deletes the content of the written file

I am trying to write my first bash script. It simply checks if a USB-to-Seria bridge and an USB-Storage device is connected and then start writing the incomming data on the /dev/ttyUSB0 into a file on ...

2 answers

awk usage in perl scripting

Hi am writing a script which its need to grep the 6th column of the output using awk command but am getting other output. What is the exact syntax in perl to extract 6th column using awk? ...

2 answers | 28 mins ago by Premchand on Stack Overflow
3 answers

SED remove new line lines containing a pattern

I want to remove (sed or awk) the newline on all the lines that contains just one time the character " but once the newline has been removed on the line it can be remove on the following line. this ...

3 answers | 53 mins ago by Kerby82 on Stack Overflow
5 answers

Find where inodes are being used

So I received a warning from our monitoring system on one of our boxes that the number of free inodes on a filesystem was getting low. df -i output shows this: Filesystem Inodes IUsed ...

5 answers | 1 hour ago by Patrick on Unix & Linux
2 answers

Match by column and print to line

Tried searching but could not find anything substancial I have 2 files: 1: asdfdata:tomatch1:asdffdataaa asdfdata2:tomatch2:asdffdata33 asdf:tomatch3:asdfx 2: bek:tomatch1:beke ...

2 answers | 1 hour ago by jimm08998 on Stack Overflow
1 answer

How to read 5 degree data of green line intensity

When I open the 5 degree data of Green Coronal Emission line from this, I get a weird table which is not simple like the one for Coronal Index. I am only providing the table for 1939. ...

0 answers

Ubuntu 14.04 : Cannot access internet via terminal

I am able to connect to both wired and wireless networks and able to browse via a browser. So I don't think there's any network issue. However I cannot run any internet based command from my terminal ...

0 answers

A ruby script to run other ruby scripts

If I want to run a bunch of ruby scripts (super similar, with maybe a number changed as a commandline argument) and still have them output to stdout, is there a way to do this? i.e a script to run ...

1 answer

Backup SharePoint Content Database and Restore on other Farm using Powershell

HeyHo, I want to know if it is possible to write a script to BackUp a SharePoint 2013 Content Database on a Test Farm and Restore it on the Dev Farm (uses another instance of a SQL-Cluster) running ...

1 answer

How to read input from stdin until EOF read line by line with each line containing four space separated integers in C

How to read input from stdin until EOF read line by line with each line containing four space separated integers in C. It could be inputted by commands like this: $ echo 1 2 3 4 | ./myProgram or $ ...

1 answers | 1 hour ago by Joshua Vernon on Stack Overflow
3 answers

Parenthesize the third character of every word using sed

I'm trying to parenthesize the third character of every word in a text file using sed. I've tried manipulating: sed 's/\(\b[A-Z]\)/\(\1\)/g' filename This does what I need except, it parenthesizes ...

3 answers | 1 hour ago by Sam on Stack Overflow
0 answers

How can I use MobaXterme's vim instead of Unix's?

I'm using mobaXterm to connect Unix via SSH. Unix is running a very old version of vim. How can I use the local (mobaXterm's) version of vim to edit files in the Unix system? Thanks in advance!

2 answers

Exporting a variable with dot (.) in it

How to export a variable which has dot in it. I get 'invalid variable name' when I tried : export my.home=/tmp/someDir -ksh: my.home=/tmp/someDir: invalid variable name Even escaping metacharacter ...

1 answer

Bootable partition

I usually create a bootable live image of a CD on USB devices with this command: sudo dd if=image.iso of=/dev/sdx The problem is that after using this command, I cannot copy additional files on the ...

1 answers | 1 hour ago by Abbey on Ask Ubuntu
2 answers

Source from string? Is there any way in shell?

Example: #!/bin/bash source "$VARIABLE" Is to retrieve values from a remote location using curl.

2 answers | 2 hours ago by Robin Plotnik on Stack Overflow
14 answers

How can I get distribution name and version number in a simple shell script?

I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the ...

14 answers | 2 hours ago by Alix Axel on Unix & Linux
2 answers

how to pass an argument containing whitespace to a script containing gawk match()?

>gawk 'match("", "foo bar", junk)' is a legitimate command, and I would like to pass the argument foo bar to it inside a shell script: which has: #!/bin/bash gawk 'match("", "'$1'", ...

2 answers | 3 hours ago by Mark Galeck on Stack Overflow
0 answers

What is metastate and metaset?

I have two server and when one fails other takes over. But as accidentally it is configured in metastate the take over does not take place. How can we convert from metastate to metaset? What is ...

1 answer

setfacl remove group permission

I am trying to remove group ACL from a certain folder. It has permissions as below $ getfacl --all-effective public # file: public # owner: sse02 # group: apache user::rwx group::r-x ...

1 answers | 4 hours ago by Sangfroid on Stack Overflow
1 answer

Get BLKID of a an unmounted volume in go

I am trying to find out if there is a way to get details of blkid of an unmounted volume, through some native golang library. I am particularly interested in fstype of the volume

1 answers | 4 hours ago by reparo on Stack Overflow
1 answer

Count of line with exception

I need help from anyone for my requirement. Example i have a file with data like below, 2015/02/09 20:40:52.444|>=|E|X|50790506|6945| |||||||||||||||Uncaught Exception in SilentScope: ...

1 answers | 4 hours ago by Thangan on Stack Overflow
0 answers

New Login Shell anse session

Is it possible to completely create a new terminal just as the terminal we get when we press Ctrl+Alt+F2...F7 in Ubuntu? I read about sessions creating daemons from sessions which require no tty. So ...

6 answers

How to display line numbers in less (gnu)?

Does somebody know the command to make less display line numbers in the left column?

6 answers | 4 hours ago by Alex. S. on Stack Overflow
1 answer

sort only the first column and uniq

I have a list as such below: 1,cat 1,dog 2,apple 3,human I'd like an output like this: 1,cat,dog 2,apple 3,human Like value 1 from column 1 contains the value of cat and dog from column 2. ...

1 answers | 4 hours ago by XY g on Unix & Linux
2 answers

First match after match

Given this file, I would like to print the first install: line that comes after the @ bash line. Please see the file for complete input, but here is a sample @ base-files ; few lines install: ...

2 answers | 5 hours ago by anon on Stack Overflow
15 30 50 per page
1 2 3