All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
62 views

how to add additional command-line usage scenarios to script?

how can one make this script work with both input usage scenarios below? #1 ./script.sh #2 ./script.sh input.file contents of script.sh for i in *.mp4; do ffmpeg -i "$i" "${i%.*}.mp4 ...
0
votes
2answers
43 views

Concatenate the Content of Files from Various Directories with a Blank Line in Between

I have the file dir1.txt that contains the names of the following directories: 2 3 4 Directory 2 contains files 2_1.txt and 2_2.txt Directory 3 contains files 3_1.txt and 3_2.txt Directory 4 ...
1
vote
1answer
157 views

How to modify these bash functions into one?

Normally these would go in one's .bashrc file to be used as a stopwatch, but they are sort of inconvienent to use and recall with the several different commands for the different units of time. ...
0
votes
3answers
773 views

Pass arguments from previous commands (pipes) to awk/printf function and format output

I'm trying to filter the most used commands and print that out in a certain way. So far, I've managed to put the desired "filters": $ history | tr -s ' ' | cut -d ' ' -f3 | sort | uniq -c | sort -n | ...
1
vote
1answer
56 views

Opening an application and inputting a command in one line

I have developed an application in C that is a command line. The app has special keywords to output information. Currently I need to run a command to log into my application, than run a command to get ...
1
vote
1answer
547 views

How to create a short cut for the app to my desktop, instead of using terminal?

How do I access the game file in program files (x86) in script editor to create the shortcut? I enter this cmd in the terminal: cd ~/.wine/drive_c/Program\ Files\ \(x86\)/ubisoft/prince\ of\ persia/...
1
vote
1answer
681 views

How to pass Command to program open in shell?

I am writing a shell script to auto-deploy a program with Jboss-cli, in linux ubuntu. I need to open the jboss cli interface and execute some commands but I want to do this automatically. what it ...
19
votes
4answers
2k views

How can I implement a circular flow of data among interconnected commands?

I know of two types how commands can be connected with each other: by using a Pipe (putting std-output into std-input of the next command). by using a Tee (splice the output into many outputs). ...
0
votes
3answers
2k views

How to compact a chmod UNIX command

Is there anyway to compact the follow UNIX command: chmod 755 scriptA.ksh | chmod 755 scriptB.ksh | chmod 755 scriptC.ksh | chmod 755 scriptD.ksh The above command makes every KornShell (ksh) script ...
11
votes
5answers
6k views

Rerunning the same command with a different parameter

I know that I can run the following command ls Some{File,Folder} And it is equivalent to running this: ls SomeFile SomeFolder (I also use it a lot for things like mv place_{a,b}) However, I was ...
5
votes
2answers
1k views

Scheduling command/script by specifying the exact second

I'm using bash and wondering how I can execute a command/script at a later specified time, with the accuracy of a second? I read the man page for the at-command, but as far as I could understand it's ...