Scripting is series of command written in plain text file. The shell can read this file and act on the commands as if they were typed at the keyboard, the shell also provides a variety of useful programming features to make your scripts truly powerful.

learn more… | top users | synonyms

0
votes
2answers
42 views

line 45 Syntax error: unexpected end of file

Now no matter what I do it just always says that even with a fi it doesnt do that help me debug the code please. also this has 44 lines of text and it says line 45 also the ascii art is just a dog it ...
1
vote
1answer
43 views

How can I remove an entry from a list in a shells script?

I have the following script: #!/bin/bash # Bash Menu Script Example PS3='Please enter your choice: ' options=("Option 1" "Option 2" "Option 3" "Quit") select opt in "${options[@]}" do case $opt ...
0
votes
0answers
13 views

Startup script for pxeboot

I am working on pxeboot. Now i want to do startup script in pxeboot server and whenever client started the startup script will run on the client machine. How to do that. ?
-3
votes
1answer
65 views

Shell Scripting

I'm trying to run my .sh file but when I try to execute it it doesn't work. I did echo '#!/bin/bash' > cadetkpgm.sh in order for the .sh file to be executable but when I use ./cadetkpgm.sh or bash ...
0
votes
2answers
48 views

Nano save to stdout (or an inline editor for terminal)

Is there a way of saving nano to stdout? Or an inline editor for terminal? I mean, I would like to do things as for example, editing an interactive php script like (from terminal): $ php ...
-1
votes
2answers
79 views

Command to run GUI Frontend for apt-get update

I want know, if there is any command to run apt-get update in GUI like in the picture following: All i want to do is to write a script which will update the software sources through this gui ...
-1
votes
2answers
52 views

create a file before writing into it using python [closed]

I am new to python. I wanted to know if I could create a text file in the script itself before writing into. I do not want to create a text file using the command prompt. I have written this script ...
1
vote
0answers
11 views

How can I install ubuntu-restricted-extras without having to confirm the ttf-mscorefonts-installer licenses manually? [duplicate]

Whenever I do a fresh install of Ubuntu, I have a whole lot of programs I install and remove by using a few big apt-get commands. I use the --assume-yes flag so I don't have to confirm the ...
3
votes
1answer
204 views

Search specific text from file and output the line (Shell script)

Suppose I have a variable $str1 str1="20140121-21:48:26|Joanne Frances|" What I want to do is search that part in the file. The file contains, for example: 20140121-21:48:26|Joanne ...
0
votes
4answers
6k views

How do I read a variable from a file?

I want to insert in my script a value (string) that I would read from a text file. For example, instead of: echo "Enter your name" read name I want to read a string from another text file so the ...
0
votes
0answers
63 views

Execute command at user login

I've searched and read tons of posts like this one but none seem to give a fix for what I'm looking for: to only execute the command: sudo iwconfig wlan0 power off every time a user logs in. Some ...
3
votes
2answers
170 views

How to batch organize files?

I have a directory with gigabytes (about 8gb) of small individual files. I want to organize them into directories by date. The date it was created is part of the filename. Here is an example of a ...
2
votes
1answer
2k views

Assign VNC password using script

I am using a script to automatically set up a computer. I need to assign a password to the vnc server for the user, which is normally done using the vncserver command. However, it prompts for the user ...
2
votes
3answers
1k views

How to discover the IP addresses within a network with a bash script?

Is it possible to determine the IP addresses of systems within a network using a bash script? And how?
1
vote
1answer
129 views

Need a way to start web cam recording at specific time

I have a laptop with an integrated camera and I want to write a script that will record a 10 minute video when the clock reaches a certain time. What apps/commands can I use to achieve this?
0
votes
1answer
88 views

Bash Menu issue / question?

There is another thread for this topic but it is closed. I would like to revisit this. I m trying to write a utility script for myself. However i am not a programmer so I wanted to get some feed back. ...
0
votes
1answer
248 views

Running binary from shell script creates core?

I am facing an issue when I am running my executable(binary program) from the shell, Its running fine. But when i run that executable from shell script then that executable creates core dump. For ...
3
votes
1answer
132 views

Function inside .profile results in no log-in

I've created a custom function in my .profile, and I've added right at the bottom, after my custom aliases : # custom functions function eclipse-gtk { cd ~/development/eclipse-juno ...
4
votes
2answers
117 views

How can I sort packages by file size when searching the repositories?

I'm trying to look at some statistics on the size of packages in the Ubuntu repositories, and I'm hoping to sort my searches of packages in the repositories by file size. Is there a command that will ...
2
votes
1answer
701 views

How to detect image dimensions and run commands on them?

I have a directory full of images, some of which are portrait-sized instead of landscape-sized, and I want to open the portrait-sized ones with an image editor. I can run the imagemagick command ...