bash

  • How to make 'file' believe that an executable is not stripped? 2018-12-06

    The program file is commonly used among the Linux userbase and I have one question related to this; Every time I strip an executable completely, file reports that the executable is stripped and in some cases, that it is 'stripped to external PDB' - I

    Tags: shell, bash, exe, elf, strip
  • Read output from ttyUSB0 2018-12-04

    After installing one relay board in respberry pi I tested with success some commands to open and close the relays but I found one problem. I do not receive the status of the eight relays or the status of single relay. How can I fix this? The permissi

    Tags: linux, bash, raspberry pi, raspbian
  • Error running bash script in supervisor 2018-11-28

    I have a bash script that makes some work supervising network stuff, it works great when I run it manually, but when I put it in supervisor the ifs and the whiles does not work, just stops before any of those programming sentences, echos, running cat

    Tags: shell, linux, bash, debian, supervisor
  • C++ getenv doesnt update 2018-11-15

    I'm trying to make a program that a bash script runs. I want the bash script to be able to change the state of the c++ program, and the only thing I could find was to use environment variables. Thing is, its seems getenv only gets the value at the ti

    Tags: linux, bash, getenv
  • stdout and stderr redirection in child process 2018-09-20

    If I run a Bash script like this: ./script.sh 2>&1 stderr will be redirected to stdout. If the script calls some tool inside (e.g. ls) or spawns a new process, will these child processes have their stderr also redirected to stdout? --------------So

    Tags: unix, bash, process, stdout, stderr
  • Running Local Script On SSH Server 2018-09-20

    I'm using Linux to log into a server using ssh. Once I'm logged in, I would like to execute a local Python script which uses netcat to run some program on the remote machine (it is therefore required to be logged in to access it). Locally I can type

    Tags: linux, bash, ssh
  • execute shell command with php 2018-09-20

    im trying to execute a bash script with a php/html button to wake my nas. <form action="" method="POST"> <input type="submit" value="Wake NAS" name="zero" /> </form> <?php if (isset($_

    Tags: shell, php, bash
  • linux cron truncate large file 2018-08-24

    I have a large csv file that I need to reduce to the last 1000 lines through a cron job every day. Can anyone suggest how to accomplish this? What I have so far are two commands but do not know how to combine them For deleting lines from the begginin

    Tags: linux, bash, csv, cron
  • How to use a command from awk in the right way 2018-08-23

    I have the next command : awk -v M="$variable" -v B=$"version"-v R="Pass ok" -v K="1" 'BEGIN {FS=","; OFS=","} $1==M {$14=R} {$3=B} {$23=K} {print}' file1.csv > file2.csv and i dont know why i

    Tags: linux, bash, awk
  • how to use getopt/getopts 2018-07-05

    So, I've learned how to pass in arguments in my bash script. The next step for me is to pass in a flag with the argument. For example,-id 12345, -d YES or -d NO, -h localhost. So, I'm looking to execute like so: ./Build.sh -id 12345 -d YES -h localho

    Tags: shell, unix, bash, getopts
  • unix command to grep text from server and write it to a file in unix 2018-06-26

    the below i have to do using a script which will be there on unix box server. I wanted to grep text(eg.Some_ID=123456) from log files present in log folder of my server. and want to c create and write that data into another text file which will be al

    Tags: shell, scripting, unix, bash
  • bash script for word count a particualar file in a directory then the result is output in a logfile and the logrotate 2018-06-22

    bash script to word count a particualar file in a directory then the result is output in a logfile and then entry in the log file rotate. this is what I have tried something like: Dir=$1 filename="${Dir#*.}" auditfile="/tmp/claim" clai

    Tags: bash
  • compose images with different names but the same numbers in 2 folders 2018-06-20

    Hello electric friends In Imagemagick I want to compose images from 2 folders with the same number but different name. I have already found "Compose two images in shellscript" but, than I have to rename all files in the second folder first. Whic

    Tags: image, bash
  • script doesn't start on boot with init 2018-05-31

    I have the following script #!/bin/sh # chkconfig: 345 99 01 # description: some startup script ### BEGIN INIT INFO # Provides: weblogic # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Default-Start: 2

    Tags: shell, linux, bash, init
  • Linux CLI change price (awk or sed?) 2018-03-18

    I have price strings formatted as $25.00 in various html files. I would like to use the Linux command line (BASH, presumably with awk or sed) to increase each price by a certain dollar amount ($3 in this case). In short, I need to find $nn.00 and rep

    Tags: regex, linux, bash, awk, sed
  • How do you source a shell script with dart.io in the current process? 2018-03-18

    Process.run (and all variants) complain about using the '.' and 'source' commands. Is there a built-in way to do this with the run methods or is there a particular executable I can try calling that will mimic bash's source command? --------------Solu

    Tags: bash, dart, dart io
  • Bash quote characteristics 2018-02-18

    So I am curl'ing some data in the form of a dictionary/json and want to make use of a bash variable. If I create a for loop and enclose the dictionary like: for i in {1..5}; do curl blah blah -d '{"key": "value $i"}'; done Then it will

    Tags: bash
  • Pseudo terminal will not be allocated error - ssh - sudo - websocket - subprocess 2018-02-15

    I basically want to create a web page through which a unix terminal at the server side can be reached and commands can be sent to and their results can be received from the terminal. For this, I have a WSGIServer. When a connection is opened, I execu

    Tags: python, bash, ssh, terminal, client server
  • Random single quotes being added to option 2018-02-14

    I'm trying to do an rsync like this in a bash script; rsync -e "ssh ${flags_ssh}" -avRz --rsync-path="sudo rsync" $direcNew $(eval echo ${user_name})@$(eval echo ${instance_address}):$(eval echo ${mountdir}`) However, when I run this u

    Tags: bash, rsync
  • Compare case insensitive strings then count duplicates 2018-01-28

    So I have a text file that looks like this: (first column is the number of repetition, the second column is the data) 27 amalyais 17 knc154 14 formulaoneboy 13 mathchallenged31 9 GooGooo1234 8 rkinder 7 tony 7 rammnatt2003 My code reads the text file

    Tags: text files, bash, awk, sorting, case insensitive

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 3.151 (s). 9 q(s)