Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Is it Possible to combine these two loops into one? Post 303009931 by MadeInGermany on Friday 22nd of December 2017 09:27:20 AM
Old 12-22-2017
Yes that should work and is most efficient!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

While Loops

I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered: ex. Please enter file no #1: 17920 ... (4 Replies)
Discussion started by: vdc
4 Replies

2. UNIX for Dummies Questions & Answers

two loops

Hi, how can I use "for" to have two loops : this is my script : for i in (A B C) do for j in (a b c) do echo $i$j done done #End I want to print out Aa Ab Ac .... But I have error message : syntax error at line 1 : `(' unexpected Many thanks before. How should I use "for" ?? (2 Replies)
Discussion started by: big123456
2 Replies

3. Shell Programming and Scripting

while loops

Hi I've a file like so: Now, I want to read my file and take ex. the Media ID and the Type for each groups of Media (Media1,Media2,...,Media(n): cat /tmp/file|\ while read FILE do while $(FILE|cut -d: -f1)=Media$i do #here will be some test, ex: #if Media ID < 23 ... (4 Replies)
Discussion started by: nymus7
4 Replies

4. UNIX for Dummies Questions & Answers

For Loops

Hi everyone, I have a question regarding for loops. I am writing a BASH shell script that will contain multiple loops. These loops all involve looping with a count: for (( a=0; a <=10; a++ )); do echo $a done If none of my multiple loops relate to each other throughout the script,... (3 Replies)
Discussion started by: msb65
3 Replies

5. Shell Programming and Scripting

Loops

Hi All, I want to execute a script the number of times a user enters. Please can you advise on hor can I do the same. Many Thanks, Shazin (4 Replies)
Discussion started by: Shazin
4 Replies

6. UNIX for Dummies Questions & Answers

loops with tr

Hello, I'm not sure if this is more appropriate for the 'unix for dummies' or the 'unix for experts' forum because I'm new to this forum and this is the second topic I've discussed, but if you could let me know which one was more appropriate for something like this, please do! So in tr (an... (2 Replies)
Discussion started by: juliette salexa
2 Replies

7. Shell Programming and Scripting

loops

Hi All I have some directories on our server which are containing .csv files. i need to print value of cell "B2" from those csv files. Please advise. I have tried head command as example: head -2 */Book_Collection_Report_1_-_Collection_Requests_trials.csv | sed -n "3p" | awk -F","... (4 Replies)
Discussion started by: yash1978
4 Replies

8. Shell Programming and Scripting

Loops

Hi All, I am very new to Shell scripting. I read basic scripting manual. But i didn't understand the code. Please tell the meaning of the below code: while getopts "F:f:R:r:C:c:" opt 2>/dev/null do case ${opt} in F|f) FREQUENCY_MODE=$OPTARG;; ... (3 Replies)
Discussion started by: pdathu
3 Replies

9. UNIX for Advanced & Expert Users

Help with loops?

I'm trying to understand better the while and until loops, can someone help me with this example? #!/bin/bash # Listing the planets. for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto do echo $planet # Each planet on a separate line. done echo; echo for... (3 Replies)
Discussion started by: jose2802
3 Replies

10. UNIX for Dummies Questions & Answers

Need help with for loops

Why wont my for statements work? Im trying to get this script to swich to a user an if you put in a start/stop/or restart paramater to do just that for each user. I commented out the actual start/stop actions to test it just by using echos and not do anything hasty in the environment but it... (0 Replies)
Discussion started by: LilyClaro
0 Replies
IFP(1)							      General Commands Manual							    IFP(1)

NAME
ifp - access iRiver iFP audio devices SYNOPSIS
ifp command [arguments ...] DESCRIPTION
ifp lets you manage your music on an iRiver iFP music player acting in "Manager Mode". If your player is using "UMS Mode", then you don't need this program; it will appear as new drive when you plug it in. This manual page documents the version of ifp included as an example application for the libifp library. The interface is intended to mimic the ifp binary found in the ifp-line binary package. ifp can upload or download files or directories, delete or make directories on the device, format the device, or upgrade your firmware. COMMANDS
ls [directory] List the files and directories on the device. The root directory is /. Directories are preceded with 'd' and other files with 'f'. df Display total and free space on the device. upload localfile remotefile Copy the file named localfile to the iFP device, and name it remotefile. (This is like cp.) upload localfile remotedir Copy the file named localfile to the iFP device, into remotedir. (This is like cp.) upload localdir remotedir Copy the entire directory localdir to the device, into remotedir. This copies into a subdirectory, so upload foo / puts files from the directory foo info /foo on the device. (This is like cp -R.) This uploads the entire directory, not just audio files. put localfile | localdir Upload the file or directory to the device, with the same name it has locally. If a directory is given, it is put in /. download remotefile localfile download remotefile localdir download remotedir localdir Like upload, but copies from the iFP device to your system. Some proprietary file types may not be downloaded. get remotefile | remotedir Like put, but copies files or directories from the device to your current working directory. rm [-r] file Delete (recursively) a file (or directory) on the device. rmdir dir Delete an empty directory on the device. mkdir dir Create a directory on the device. battery Display battery status of the device. typestring Display the model number of the device. firmversion Display the firmware revision currently on the device. format Reformat the device's memory. This will delete all your music. firmupdate FIRMWARE.HEX Upload the file FIRMWARE.HEX as new firmware for the device. This will not delete your music, but may have many other detrimental effects. Don't turn the device off or unplug it while the firmware is updating, and don't attempt to upload new firmware with a low battery. AUTHORS
libifp was written by Geoff Oakham, based on ifp by Yamashiro Jun. This manual page was written for Debian by Joe Wreschnig <piman@debian.org>, but may be used by others. May 30th, 2004 IFP(1)
All times are GMT -4. The time now is 04:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy