12 tags on


  • All Sites

2 answers

“sed” special characters handling

we have an sed command in our script to replace the file content with values from variables for example.. export value="dba01upc\Fusion_test" sed -i "s%{"sara_ftp_username"}%$value%g" ...

2 answers | 4 mins ago by Tech Tech on Stack Overflow
2 answers

replace multiple spaces with one using tr only

I have a file f1.txt ID Name 1 a 2 b 3 g 6 f The number of spaces is not fixed. What is the best way to replace all the white spaces with one space using only tr This …

2 answers | 4 mins ago by Unknown on Unix & Linux
5 answers

File Sizes in Windows Not Making Sense

Here I have this file in Windows: But isn't 62,563 bytes 62.6 KB?

5 answers | 6 mins ago by Kirk on Super User
0 answers

systemcalls.h no such file or directory found

I am reading C programming by K&R and i just started the last chapter: UNIX SYSTEM INTERFACE. I came across the a filecopy code which makes a system call. First i compiled that code in codeblocks …

2 answers

how to check for multiple strings in 'if-then-else-fi' in linux?

I have a file named 'testfile', which contains: Computer Science 123 Congress Street, Biology 2 New York Ave, Graduate Center 1 New York Ave And I have a script named 'search' as …

2 answers | 11 mins ago by user3466619 on Stack Overflow
1 answer

What package has GNU sed for Solaris?

I need to use the features of GNU sed, instead of the built-in version under Solaris 10. Which GNU package contains it? I don't see it listed in the coreutils, and my Google searches haven't helped …

1 answers | 12 mins ago by Randall on Unix & Linux
5 answers

Perl escaping argument for bash execution

I've written some code in Perl which executes some bash command within its execution. My problem was when bash command attributes contained white space inside which failed bash command execution. But …

5 answers | 18 mins ago by J33nn on Stack Overflow
8 answers

The following artifacts could not be resolved: javax.jms:jms:jar:1.1

I am trying to compile a maven project, but I systematically get the following error message: [ERROR]Failed to execute goal on project ...: Could not resolve dependencies for project ...:war:1.0.0: …

8 answers | 25 mins ago by JVerstry on Stack Overflow
1 answer

how can I run new gradle task?

I have created a new gardle task in build.gradle task callCL(type: Exec) { println "hello" commandLine './' } which suppose to run #!/bin/bash cucumber -f …

0 answers

Identify new Android devices attached or remove in Bash

In this code when the function is called it goes into the infinite loop and has the same device ids which was passed as parameters. I want to make sure that when a new device is added or the attached …

3 answers

Aggregate and group text file in bash

I have a big text file(with 5m lines) in this format(4 columns, separated by ;): string1; string2; string3; userId The first 3 strings (SHA1s) form a single ID, called appId (so it can be ...

3 answers | 1 hour ago by Metallica on Unix & Linux
1 answer

Running terminal commands at startup

Please excuse a simple question from a new Linux user. Running Ubuntu 12.04 on a Dell Pentium(R) Dual-Core CPU E5800 @ 3.20GHz × 2. I installed Dropbox OK with the command: cd ~ && wget …

1 answer

Output a text file's values in a specific manner using bash?

I am trying to look a for some specific values (such as 1 or 4) from a text file using bash. If this value is found in the file, then I want to call a function and pass it the found value as an ...

1 answers | 1 hour ago by Alias on Stack Overflow
1 answer

Shell Script while loop for converting a file into variable

So I have a snippet of the excel forms, and I am trying to use bash script to convert them into a format we want. The file looks like this: Group1 Member1 ********** Member2 ********** ...

1 answers | 1 hour ago by Tony on Stack Overflow
1 answer

How do I use sudo to run multiple commands as another user within a portion of a script?

I'm trying to run the following: if [! -f .owner ]; then creator=$(whoami) sudo -u appuser ksh echo "$creator" >> .owner mkdir test1 test2 test3 exit fi However, the ...

1 answers | 1 hour ago by charles on Unix & Linux
1 answer

Configure range of virtual user names with same password

I would appreciate if there is anybody who can advise me if the following FTP configuration is possible. I need range of read-only users that follow this pattern: (_[0-9]{15}) e.g., ...

1 answers | 1 hour ago by ruruskyi on Server Fault
1 answer

How to use Java to Index entire hard drive / filesystem?

I want to use Java to get file changes on the entire hard drive. e.g. c:\ or /mnt/drives/hdd1 It is a requirement because many different computers are used with different file structure, which ...

0 answers

How can I use grunt-exec with arbitrary subsets of shell commands?

I want to define a tree of shell commands in my Gruntfile.js, using grunt-exec to write shell commands. I can do this for a single command, but I can't figure out the syntax for writing multiple sets …

0 answers

django shell not fully executing script

I have a script ( that looks like the following: array = [] for item in table: #do some stuff and append to `array` for row in array: print row when I run python shell …

2 answers

Is there a way to define a user-defined function inside an awk statement which is inside a bash script?

I think the question speaks for itself. I am a beginner so please let me know if this is possible or not. If not, came you give me a better solution because my bash script depends heavily on certain …

2 answers | 1 hour ago by Alias on Stack Overflow
2 answers

SQL. Select Unixtime for whole day

I am looking for a way to select a whole days worth of data from a where statement. Timestamp is in unix time such as (1406045122). I want to select the today's date of unix time range and find all …

2 answers | 2 hours ago by user3794531 on Stack Overflow
0 answers

Call java jms listener app from shell script and write its pid to a file

I am calling a java program from a shell script on solaris paltform. Java pragram is responsible for starting the JMS listeners using spring context. I can not return exit status(System.exit() because …

0 answers

Shell Exension: IShellExtInit::Initialize called 4 times

I've run into a situation that is not so unique (others have been asking exact same question) Offsite similar question.. Basically, for some reason, the code in IShellExtInit::Initialize ...

1 answer

IGNORCASE in file comparison with awk

Here is my code: 'FNR==NR {a[$1 FS $2 FS $3 FS $4]++; next} !a[$1 FS $2 FS $3 FS $5]' comparegam.txt workstudyusers1.csv >noidea6.txt it is doing exactly what I need except I need to ignorecase. …

1 answers | 2 hours ago by moore1emu on Stack Overflow
1 answer

Unable to connect to localhost or local ip but can connect to other servers or websites

I have a server with nginx|bind|mysql installed, everything is working fine but i am unable to connect to localhost or any websites hosted on server. i tried pinging and wget and none of them work …

1 answers | 2 hours ago by Deepak on Server Fault
2 answers

Read a text file with line by line

I'm a novice at coding so please be patient with me. I've created a Workflow with Automator (OSX) which works fine. The only issue I have is that I want it to run on a number of inputs (that is as a …

3 answers

Ksh command to find files modified during last hour

Can you please tell me most efficient command which can be used to find files modified in a directory in last hour ( more precisely last 60 minutes). Or If its not good approach then please tell …

2 answers

Launch Visual Studio 2012 Shell (Integrated) and run SSIS package using Windows Scheduler

I am working on a project that creates a reporting database by loading data from an AS400 into SQL Server 2012 Express (just FYI - I do not have sql agent or sql profiler). I downloaded sql server ...

4 answers

How to start a linux service(bash script) containing infinite loop in start method

I'm trying to check whether one of my process is running or not in every 10 minutes and if not, restart that process. I want this script to start automatically when the system boots up, so I go for …

4 answers | 3 hours ago by HRM on Stack Overflow
4 answers

Linux : To monitor a Service and restart if stopped?

Actually I'm not so sure whether i should use Shell Scripts, or if there some ways already. But whatever approach we use, i would like to keep a Service running all the time. Let's say iptables as an …

15 30 50 per page
1 2 3