Questions tagged [shell-scripting]

Programming in an Interpreted language executed by a running Shell

Generic programming in an Interpreted language (as opposed to compiled) executed by a running Shell. Sometimes referred to as "Glue Code" due to the practice of managing the execution and output of one or more compiled binaries and passing said output to another series of commands.

621 questions
-1
votes
1 answer

linux + print message on the screen after login to linux machine

I have linux machine red-hat 5.1 I want to write ksh/bash script that perform the following Each time that someone login to the linux machine then he will get the following message on the screen - after entering login/password PLEASE DONT DO…
yael
  • 2,433
  • 5
  • 31
  • 43
-1
votes
3 answers

linux + generate new file with specific structure from text file what the best option

in my Linux machine I have the file orig-file.txt this file include now 4 fields but they could be less or more ( this file generate by other application ) I need advice - what the best option to translate the orig-file.txt to file as…
yael
  • 2,433
  • 5
  • 31
  • 43
-1
votes
1 answer

How to I retain text case while using %h in mt-daapd's config file?

In my mt-daapd config file is the line name = %h which, if I understand correctly, when my hostname is aCoolHostname this will evaluate to name = acoolhostname in lowercase. How do I use the %h but keep the lovely case formatting?
Isius
  • 284
  • 1
  • 4
  • 15
-1
votes
2 answers

Shell script output and input from c programs

I am new to Shell scripting.How am I supposed to take the output of a c program that i execute and give it as an input to another c program all using shell.
myax
  • 9
  • 1
  • 2
-1
votes
2 answers

Where can i find the advanced home dir backup scripts

Is there any script for linux which can backup the home directories and mysql databases in separate directories . i mean best of all scripts which is general and any one can use that one. By backup i mean , i just to makr tar.gz and copy to separate…
Mirage
  • 561
  • 4
  • 10
  • 25
-1
votes
1 answer

Extract Pages from Various PDF Files into New PDF File

From a.pdf, I would like pages 2 and 5 b.pdf, pages 3 and 4 c.pdf, pages 7, 8, and 9 copied into a new PDF file. All input pdf files are ten pages long. I'm using bash, and plan to make many documents like this (with different input files and…
-1
votes
1 answer

Copy/Move Entire Line To End Of The Line Above

I have a file that looks like the following: /path/to/a/very/long/path 0 0 0 0 0 0 I need to move the line starting with a number (this can be any value not necessarily 0) to the end of the preceding line so that it looks like the…
djc72uk
  • 33
  • 1
  • 6
-1
votes
1 answer

How to execute remote commands on linux and update return value?

As part of automation in gitlab ci. I am running a terraform template and creating a linux machine. After that, I need to run few commands on the remote machine. I am running those using the ssh remote command. But at the end, even if it is failure,…
Kalel
  • 134
  • 1
  • 4
  • 16
-1
votes
1 answer

Handle exception with long paths in Powershell

I am new here and I facing issues with my powershell script whith long paths. This script aims to get relative path and hash from files/folders and its subfolders. It works with some with others I get the following error: Get-ChildItem : The…
-1
votes
1 answer

Can somebody help me on how to zip these individual log files within while loop

I am able to break o/p of a big logfile (filename.log) into individual log files of 1 min each (filename.log.140108) using while loop, but I want these files to be saved as zip files due to capacity issue on VM. Can anyone pls help…
Nakul
  • 1
-2
votes
1 answer

How to convert shell output to excel

Through Linux On executing a shell script I am getting a output which is separated by space. I have to convert this to a excel format. This output should be converted to a excel file which should be available in home directory. Kindly help me with…
-2
votes
1 answer

How to output one number few times with spaces in one line via bash

How to output one number few times with spaces in one line via bash I have a=5 b=10 I should output 5 times number 10 with using of variables and with spaces Also, i should capture this in variable For example, i have to receive this 10 10 10 10…
Piduna
  • 541
  • 4
  • 12
  • 25
-2
votes
2 answers

Shell script to enumerate the (already existing) LDAP group called "VPN Users"

I am new to LDAP and learning about the ldapsearch and ldap in general. Would like to write a shell script that enumerate the (already existing) LDAP group "VPN Users", then get all user "samaccountname" (e.g.joe.smith). Can someone please help?…
Irina I
  • 1
  • 2
-2
votes
1 answer

automated change password on linux servers

Dear friends and colleges Each half year we need to change the password on our redhat Linux servers , we have 8723 servers!!! In our company Is it possible to automate password changing each half year without our involving ? Regarding the password…
jango
  • 59
  • 2
  • 3
  • 12
-2
votes
1 answer

Script to search bots from log file

I have a little log-file, where i should find the bots. File: Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged in| - Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user changed password| - Mon, 22 Aug 2016…